SlideShare a Scribd company logo
1 of 128
Copyright © 2017 SG Corporation. All right reserved.
Let’s LL
第二事業部 市岡岳彦
2017/2/3
Copyright © 2017 SG Corporation. All right reserved.
本資料の内容は(株)エス・ジー社員の
市岡岳彦の個人的見解であり、
(株)エス・ジーの公式見解ではありません。
2017/2/3 2
Copyright © 2017 SG Corporation. All right reserved.
LL?
2017/2/3 3
Copyright © 2017 SG Corporation. All right reserved.
Lightweight
Language
2017/2/3 4
Copyright © 2017 SG Corporation. All right reserved.
Lightweight
2017/2/3 5
Copyright © 2017 SG Corporation. All right reserved.
Language
2017/2/3 6
Copyright © 2017 SG Corporation. All right reserved.
スクリプト言語とか
2017/2/3 7
Copyright © 2017 SG Corporation. All right reserved.
動的型言語とか
言われてたもの
2017/2/3 8
Copyright © 2017 SG Corporation. All right reserved.
PHP,JavaScript,
Python,Ruby,…
2017/2/3 9
Copyright © 2017 SG Corporation. All right reserved.
でも
2017/2/3 10
Copyright © 2017 SG Corporation. All right reserved.
巷間伝えるところ
2017/2/3 11
Copyright © 2017 SG Corporation. All right reserved.
変数に型がないと
わかりにくいよ
2017/2/3 12
Copyright © 2017 SG Corporation. All right reserved.
コンパイル時の
型安全性が確保できない
2017/2/3 13
Copyright © 2017 SG Corporation. All right reserved.
勝手に型が変換されて
よくわからない
2017/2/3 14
Copyright © 2017 SG Corporation. All right reserved.
とかね
2017/2/3 15
Copyright © 2017 SG Corporation. All right reserved.
disってても
仕方がないので
2017/2/3 16
Copyright © 2017 SG Corporation. All right reserved.
まずは静的型言語を
見てみよう
2017/2/3 17
Copyright © 2017 SG Corporation. All right reserved.
printf(“%s:%dn”, “orange”, 5);
2017/2/3 18
Copyright © 2017 SG Corporation. All right reserved.
これは変だ
2017/2/3 19
Copyright © 2017 SG Corporation. All right reserved.
printf(“%s:%dn”, “orange”, 5);
Cの可変長引数は型安全じゃない
2017/2/3 20
Copyright © 2017 SG Corporation. All right reserved.
System.out.println(“orange:” + 5);
2017/2/3 21
Copyright © 2017 SG Corporation. All right reserved.
これは変だ
2017/2/3 22
Copyright © 2017 SG Corporation. All right reserved.
System.out.println(“orange:” + 5);
Javaは演算子オーバーロードは
ないはずなのに?
2017/2/3 23
Copyright © 2017 SG Corporation. All right reserved.
もうちょっと
見てみよう
2017/2/3 24
Copyright © 2017 SG Corporation. All right reserved.
Cでは…
0がfalseで
0以外はtrue
2017/2/3 25
Copyright © 2017 SG Corporation. All right reserved.
Cでは…
文字列に’0’が
出現したら終端
2017/2/3 26
Copyright © 2017 SG Corporation. All right reserved.
ですよねー
2017/2/3 27
Copyright © 2017 SG Corporation. All right reserved.
静的型言語も
2017/2/3 28
Copyright © 2017 SG Corporation. All right reserved.
変なルールが
いっぱいあるよ
2017/2/3 29
Copyright © 2017 SG Corporation. All right reserved.
お互い様だね
2017/2/3 30
Copyright © 2017 SG Corporation. All right reserved.
それはそうと
2017/2/3 31
Copyright © 2017 SG Corporation. All right reserved.
人々は言う
2017/2/3 32
Copyright © 2017 SG Corporation. All right reserved.
型がない
2017/2/3 33
Copyright © 2017 SG Corporation. All right reserved.
正確に言うと
2017/2/3 34
Copyright © 2017 SG Corporation. All right reserved.
変数に型がない
2017/2/3 35
Copyright © 2017 SG Corporation. All right reserved.
と言うか
2017/2/3 36
Copyright © 2017 SG Corporation. All right reserved.
プログラミングスタイル
の違いとして
2017/2/3 37
Copyright © 2017 SG Corporation. All right reserved.
型を変数の属性と
みなすか
2017/2/3 38
Copyright © 2017 SG Corporation. All right reserved.
型を値の属性と
みなすか
2017/2/3 39
Copyright © 2017 SG Corporation. All right reserved.
型がないわけじゃない
2017/2/3 40
Copyright © 2017 SG Corporation. All right reserved.
えーと
2017/2/3 41
Copyright © 2017 SG Corporation. All right reserved.
[Pythonの場合]
x = 'banana'
print type(x) # <type 'str'>
x = 2357
print type(x) # <type 'int'>
2017/2/3 42
Copyright © 2017 SG Corporation. All right reserved.
[PyObject構造体]
typedef struct _object {
PyObject_HEAD
} PyObject;
typedef struct {
PyObject_HEAD
long ob_ival;
} PyIntObject;
2017/2/3 43
Copyright © 2017 SG Corporation. All right reserved.
Pythonの内部構造::PyObject
http://postd.cc/python-
internals-pyobject/
2017/2/3 44
Copyright © 2017 SG Corporation. All right reserved.
これはそれほど
驚くことでもない
2017/2/3 45
Copyright © 2017 SG Corporation. All right reserved.
JavaやC#プログラマだって
2017/2/3 46
Copyright © 2017 SG Corporation. All right reserved.
意識してることだよね
2017/2/3 47
Copyright © 2017 SG Corporation. All right reserved.
してるよね
2017/2/3 48
Copyright © 2017 SG Corporation. All right reserved.
しろよ
2017/2/3 49
Copyright © 2017 SG Corporation. All right reserved.
Object型であれば
なんだって入るからね
2017/2/3 50
Copyright © 2017 SG Corporation. All right reserved.
[Javaの場合]
Object obj = "grape";
System.out.println(obj.getClass());
// class java.lang.String
obj = 1234;
System.out.println(obj.getClass());
// class java.lang.Integer
2017/2/3 51
Copyright © 2017 SG Corporation. All right reserved.
それを踏まえて
2017/2/3 52
Copyright © 2017 SG Corporation. All right reserved.
[Pythonの場合]
a = ‘banana' # <type 'str'>
b = 2357 # <type 'int'>
2017/2/3 53
Copyright © 2017 SG Corporation. All right reserved.
変数宣言と同時に
代入によって
2017/2/3 54
Copyright © 2017 SG Corporation. All right reserved.
暗黙の型宣言がなされて
いるようなもの
2017/2/3 55
Copyright © 2017 SG Corporation. All right reserved.
[Pythonの場合]
str a = ‘banana'
int b = 2357
2017/2/3 56
Copyright © 2017 SG Corporation. All right reserved.
LLプログラマには
コードがこう見えてる
2017/2/3 57
Copyright © 2017 SG Corporation. All right reserved.
ところで
2017/2/3 58
Copyright © 2017 SG Corporation. All right reserved.
コンパイル時の
型安全性が確保できない
2017/2/3 59
Copyright © 2017 SG Corporation. All right reserved.
って、言ってたよね
2017/2/3 60
Copyright © 2017 SG Corporation. All right reserved.
いつ
型チェックをするか?
2017/2/3 61
Copyright © 2017 SG Corporation. All right reserved.
「実行時」です
2017/2/3 62
Copyright © 2017 SG Corporation. All right reserved.
彼らはなぜ
2017/2/3 63
Copyright © 2017 SG Corporation. All right reserved.
それで問題ないと
主張するのか?
2017/2/3 64
Copyright © 2017 SG Corporation. All right reserved.
「テストファースト」
2017/2/3 65
Copyright © 2017 SG Corporation. All right reserved.
ここ重要
2017/2/3 66
Copyright © 2017 SG Corporation. All right reserved.
ユニットテストの
テストケースがない
コードは
2017/2/3 67
Copyright © 2017 SG Corporation. All right reserved.
信用できない
2017/2/3 68
Copyright © 2017 SG Corporation. All right reserved.
ユニットテストは
2017/2/3 69
Copyright © 2017 SG Corporation. All right reserved.
コンパイラの
検証より有用
2017/2/3 70
Copyright © 2017 SG Corporation. All right reserved.
強力な柔軟性を
手に入れつつ
2017/2/3 71
Copyright © 2017 SG Corporation. All right reserved.
プログラムの動作を
担保する
2017/2/3 72
Copyright © 2017 SG Corporation. All right reserved.
じゃあ
2017/2/3 73
Copyright © 2017 SG Corporation. All right reserved.
柔軟性って?
2017/2/3 74
Copyright © 2017 SG Corporation. All right reserved.
「ダックタイピング」
2017/2/3 75
Copyright © 2017 SG Corporation. All right reserved.
class Duck:
def sound(self):
return 'quack'
def test(foo):
print foo.sound()
test(Duck()) # quack
2017/2/3 76
Copyright © 2017 SG Corporation. All right reserved.
インターフェースと
なにが違うの?
2017/2/3 77
Copyright © 2017 SG Corporation. All right reserved.
インターフェースは
一度決めると
後から変えるのが大変
2017/2/3 78
Copyright © 2017 SG Corporation. All right reserved.
はじめに全てが分かって
いるわけではない
2017/2/3 79
Copyright © 2017 SG Corporation. All right reserved.
継承関係は必要ない
2017/2/3 80
Copyright © 2017 SG Corporation. All right reserved.
型宣言による
強制ではなく
2017/2/3 81
Copyright © 2017 SG Corporation. All right reserved.
コメントとユニットテスト
によるドキュメント化
2017/2/3 82
Copyright © 2017 SG Corporation. All right reserved.
より柔軟な
クラス間の協調
2017/2/3 83
Copyright © 2017 SG Corporation. All right reserved.
…
2017/2/3 84
Copyright © 2017 SG Corporation. All right reserved.
とはいえ
2017/2/3 85
Copyright © 2017 SG Corporation. All right reserved.
最近の傾向は
2017/2/3 86
Copyright © 2017 SG Corporation. All right reserved.
両者いいとこ取り
2017/2/3 87
Copyright © 2017 SG Corporation. All right reserved.
「タイプヒンティング」
2017/2/3 88
Copyright © 2017 SG Corporation. All right reserved.
PHP
2017/2/3 89
Copyright © 2017 SG Corporation. All right reserved.
PHP7から
タイプヒンティング
ではなく
2017/2/3 90
Copyright © 2017 SG Corporation. All right reserved.
型宣言という
ふつうの用語になって
しまいましたが
2017/2/3 91
Copyright © 2017 SG Corporation. All right reserved.
型宣言なし
2017/2/3 92
Copyright © 2017 SG Corporation. All right reserved.
function sum($a, $b) {
return $a + $b;
}
sum(1.5, 2.5); # 4
2017/2/3 93
Copyright © 2017 SG Corporation. All right reserved.
弱い型チェック
2017/2/3 94
Copyright © 2017 SG Corporation. All right reserved.
function sum(int $a, int $b) {
return $a + $b;
}
sum(1.5, 2.5); # 3
2017/2/3 95
Copyright © 2017 SG Corporation. All right reserved.
強い型チェック
2017/2/3 96
Copyright © 2017 SG Corporation. All right reserved.
declare(strict_types=1);
function sum(int $a, int $b) {
return $a + $b;
}
sum(1.5, 2.5); # 実行時エラー
2017/2/3 97
Copyright © 2017 SG Corporation. All right reserved.
型チェックの強度を
選ぶことができる
2017/2/3 98
Copyright © 2017 SG Corporation. All right reserved.
コメントによる型宣言
2017/2/3 99
Copyright © 2017 SG Corporation. All right reserved.
「Closure Compiler」
https://developers.google.com/closure/comp
iler/
2017/2/3 100
Copyright © 2017 SG Corporation. All right reserved.
JavaScript
2017/2/3 101
Copyright © 2017 SG Corporation. All right reserved.
function sum(a, b) {
return a + b;
}
2017/2/3 102
Copyright © 2017 SG Corporation. All right reserved.
JSDocの
アノテーションで
2017/2/3 103
Copyright © 2017 SG Corporation. All right reserved.
/**
* @param {number} a
* @param {number} b
* @return {number}
*/
function sum(a, b) {
return a + b;
}
2017/2/3 104
Copyright © 2017 SG Corporation. All right reserved.
とか
2017/2/3 105
Copyright © 2017 SG Corporation. All right reserved.
function /** number */ sum(
/** number */ a,
/** number */ b) {
return a + b;
}
2017/2/3 106
Copyright © 2017 SG Corporation. All right reserved.
とか書ける
2017/2/3 107
Copyright © 2017 SG Corporation. All right reserved.
言語仕様の外側に
型チェックを設ける
2017/2/3 108
Copyright © 2017 SG Corporation. All right reserved.
型推論
2017/2/3 109
Copyright © 2017 SG Corporation. All right reserved.
C#
2017/2/3 110
Copyright © 2017 SG Corporation. All right reserved.
Dictionary<string, string> dict = new Dictionary<string, string>()
{
{ "banana", "yellow" },
{ "apple", "red" },
{ "orange", "orange" }
};
foreach (KeyValuePair<string, string> elem in dict)
{
Console.WriteLine(elem.Key + ":" + elem.Value);
}
2017/2/3 111
Copyright © 2017 SG Corporation. All right reserved.
dictとelemの型は
文脈から推論できる
2017/2/3 112
Copyright © 2017 SG Corporation. All right reserved.
[dict]
Dictionary<string, string>
コンストラクタが返す型
2017/2/3 113
Copyright © 2017 SG Corporation. All right reserved.
var dict = new Dictionary<string, string>()
{
{ "banana", "yellow" },
{ "apple", "red" },
{ "orange", "orange" }
};
foreach (KeyValuePair<string, string> elem in dict)
{
Console.WriteLine(elem.Key + ":" + elem.Value);
}
2017/2/3 114
Copyright © 2017 SG Corporation. All right reserved.
[elem]
dictからforeachで取り出されて
Key,Valueプロパティを
持っているような型
2017/2/3 115
Copyright © 2017 SG Corporation. All right reserved.
var dict = new Dictionary<string, string>()
{
{ "banana", "yellow" },
{ "apple", "red" },
{ "orange", "orange" }
};
foreach (var elem in dict)
{
Console.WriteLine(elem.Key + ":" + elem.Value);
}
2017/2/3 116
Copyright © 2017 SG Corporation. All right reserved.
間違ってると
2017/2/3 117
Copyright © 2017 SG Corporation. All right reserved.
実行時ではなく
2017/2/3 118
Copyright © 2017 SG Corporation. All right reserved.
コンパイル時に
エラーになるよ
2017/2/3 119
Copyright © 2017 SG Corporation. All right reserved.
じゃあ、まとめ
2017/2/3 120
Copyright © 2017 SG Corporation. All right reserved.
型の強制をプログラマが
制御できることにより
2017/2/3 121
Copyright © 2017 SG Corporation. All right reserved.
選択の幅が広がる
2017/2/3 122
Copyright © 2017 SG Corporation. All right reserved.
APIの
インターフェースは
型宣言
2017/2/3 123
Copyright © 2017 SG Corporation. All right reserved.
ローカル変数の
型宣言はてきとうに
2017/2/3 124
Copyright © 2017 SG Corporation. All right reserved.
とかね
2017/2/3 125
Copyright © 2017 SG Corporation. All right reserved.
参考文献
オブジェクト指向設計実践ガイド
~Rubyでわかる 進化しつづける柔軟なアプリケーションの育て方
Sandi Metz 著,髙山泰基 訳
技術評論社
2017/2/3 126
Copyright © 2017 SG Corporation. All right reserved.
(株)エス・ジー
http://www.sgnet.co.jp
ブログ
http://blog.sgnet.co.jp
2017/2/3 127
Let's LL

More Related Content

Similar to Let's LL

Bird.i keynote at the Hadoop UK User Group
Bird.i keynote at the Hadoop UK User GroupBird.i keynote at the Hadoop UK User Group
Bird.i keynote at the Hadoop UK User GroupCorentin Guillo
 
AWS Migration - As-Is Tool
AWS Migration - As-Is ToolAWS Migration - As-Is Tool
AWS Migration - As-Is ToolKenji Morooka
 
Serverless ASP.NET Core 2.0 Applicationsを作ってみた
Serverless ASP.NET Core 2.0 Applicationsを作ってみたServerless ASP.NET Core 2.0 Applicationsを作ってみた
Serverless ASP.NET Core 2.0 Applicationsを作ってみたAmazon Web Services Japan
 
加速するデータドリブンコミュニケーション
加速するデータドリブンコミュニケーション加速するデータドリブンコミュニケーション
加速するデータドリブンコミュニケーションKeisuke Anzai
 
20180310 jawsdays SA LT いまCloudFormationで知るべき10のこと
20180310 jawsdays SA LT いまCloudFormationで知るべき10のこと20180310 jawsdays SA LT いまCloudFormationで知るべき10のこと
20180310 jawsdays SA LT いまCloudFormationで知るべき10のことYukitaka Ohmura
 
Martin Hinshelwood - A Devops Story from the Trenches
Martin Hinshelwood - A Devops Story from the TrenchesMartin Hinshelwood - A Devops Story from the Trenches
Martin Hinshelwood - A Devops Story from the TrenchesScrumDayLondon
 
re:Invent CON320 Tracing and Debugging for Containerized Services
re:Invent CON320 Tracing and Debugging for Containerized Servicesre:Invent CON320 Tracing and Debugging for Containerized Services
re:Invent CON320 Tracing and Debugging for Containerized ServicesCalvin French-Owen
 
Alexa連携デバイスクラウドを構成するAWS ソリューション
Alexa連携デバイスクラウドを構成するAWS ソリューションAlexa連携デバイスクラウドを構成するAWS ソリューション
Alexa連携デバイスクラウドを構成するAWS ソリューションToshiaki Enami
 
Git Merge Conflict Tutorial | Resolving Merge Conflicts In Git | DevOps Train...
Git Merge Conflict Tutorial | Resolving Merge Conflicts In Git | DevOps Train...Git Merge Conflict Tutorial | Resolving Merge Conflicts In Git | DevOps Train...
Git Merge Conflict Tutorial | Resolving Merge Conflicts In Git | DevOps Train...Edureka!
 
Latency analysis for your microservices using Spring Cloud & Zipkin
Latency analysis for your microservices using Spring Cloud & ZipkinLatency analysis for your microservices using Spring Cloud & Zipkin
Latency analysis for your microservices using Spring Cloud & ZipkinVMware Tanzu
 
AWS Migration - General
AWS Migration - GeneralAWS Migration - General
AWS Migration - GeneralKenji Morooka
 
AWS上でのオンラインゲームリリースガイド
AWS上でのオンラインゲームリリースガイドAWS上でのオンラインゲームリリースガイド
AWS上でのオンラインゲームリリースガイドAmazon Web Services Japan
 
AWS Migration - Cost
AWS Migration - CostAWS Migration - Cost
AWS Migration - CostKenji Morooka
 
Cisco Connect 2018 Indonesia - Build a spark bot
Cisco Connect 2018 Indonesia - Build a spark bot  Cisco Connect 2018 Indonesia - Build a spark bot
Cisco Connect 2018 Indonesia - Build a spark bot NetworkCollaborators
 
クラウドを活用したセンシング/モニタリングなどデータ分析の実現
クラウドを活用したセンシング/モニタリングなどデータ分析の実現クラウドを活用したセンシング/モニタリングなどデータ分析の実現
クラウドを活用したセンシング/モニタリングなどデータ分析の実現崇之 清水
 
[db tech showcase Tokyo 2018] #dbts2018 #C32 『Deep Dive on the Amazon Aurora ...
[db tech showcase Tokyo 2018] #dbts2018 #C32 『Deep Dive on the Amazon Aurora ...[db tech showcase Tokyo 2018] #dbts2018 #C32 『Deep Dive on the Amazon Aurora ...
[db tech showcase Tokyo 2018] #dbts2018 #C32 『Deep Dive on the Amazon Aurora ...Insight Technology, Inc.
 
Keith Steward - SageMaker Algorithms Infinitely Scalable Machine Learning_VK.pdf
Keith Steward - SageMaker Algorithms Infinitely Scalable Machine Learning_VK.pdfKeith Steward - SageMaker Algorithms Infinitely Scalable Machine Learning_VK.pdf
Keith Steward - SageMaker Algorithms Infinitely Scalable Machine Learning_VK.pdfAmazon Web Services
 

Similar to Let's LL (20)

Bird.i keynote at the Hadoop UK User Group
Bird.i keynote at the Hadoop UK User GroupBird.i keynote at the Hadoop UK User Group
Bird.i keynote at the Hadoop UK User Group
 
AWS Migration - As-Is Tool
AWS Migration - As-Is ToolAWS Migration - As-Is Tool
AWS Migration - As-Is Tool
 
Serverless ASP.NET Core 2.0 Applicationsを作ってみた
Serverless ASP.NET Core 2.0 Applicationsを作ってみたServerless ASP.NET Core 2.0 Applicationsを作ってみた
Serverless ASP.NET Core 2.0 Applicationsを作ってみた
 
加速するデータドリブンコミュニケーション
加速するデータドリブンコミュニケーション加速するデータドリブンコミュニケーション
加速するデータドリブンコミュニケーション
 
20180310 jawsdays SA LT いまCloudFormationで知るべき10のこと
20180310 jawsdays SA LT いまCloudFormationで知るべき10のこと20180310 jawsdays SA LT いまCloudFormationで知るべき10のこと
20180310 jawsdays SA LT いまCloudFormationで知るべき10のこと
 
Martin Hinshelwood - A Devops Story from the Trenches
Martin Hinshelwood - A Devops Story from the TrenchesMartin Hinshelwood - A Devops Story from the Trenches
Martin Hinshelwood - A Devops Story from the Trenches
 
Sbtt數位教材製作服務
Sbtt數位教材製作服務Sbtt數位教材製作服務
Sbtt數位教材製作服務
 
re:Invent CON320 Tracing and Debugging for Containerized Services
re:Invent CON320 Tracing and Debugging for Containerized Servicesre:Invent CON320 Tracing and Debugging for Containerized Services
re:Invent CON320 Tracing and Debugging for Containerized Services
 
Alexa連携デバイスクラウドを構成するAWS ソリューション
Alexa連携デバイスクラウドを構成するAWS ソリューションAlexa連携デバイスクラウドを構成するAWS ソリューション
Alexa連携デバイスクラウドを構成するAWS ソリューション
 
Git Merge Conflict Tutorial | Resolving Merge Conflicts In Git | DevOps Train...
Git Merge Conflict Tutorial | Resolving Merge Conflicts In Git | DevOps Train...Git Merge Conflict Tutorial | Resolving Merge Conflicts In Git | DevOps Train...
Git Merge Conflict Tutorial | Resolving Merge Conflicts In Git | DevOps Train...
 
Latency analysis for your microservices using Spring Cloud & Zipkin
Latency analysis for your microservices using Spring Cloud & ZipkinLatency analysis for your microservices using Spring Cloud & Zipkin
Latency analysis for your microservices using Spring Cloud & Zipkin
 
AWS Migration - General
AWS Migration - GeneralAWS Migration - General
AWS Migration - General
 
AWS上でのオンラインゲームリリースガイド
AWS上でのオンラインゲームリリースガイドAWS上でのオンラインゲームリリースガイド
AWS上でのオンラインゲームリリースガイド
 
AWS Migration - Cost
AWS Migration - CostAWS Migration - Cost
AWS Migration - Cost
 
Cloudera Sessions for Big Data & AI Highlights
Cloudera Sessions for Big Data & AI HighlightsCloudera Sessions for Big Data & AI Highlights
Cloudera Sessions for Big Data & AI Highlights
 
Cisco Connect 2018 Indonesia - Build a spark bot
Cisco Connect 2018 Indonesia - Build a spark bot  Cisco Connect 2018 Indonesia - Build a spark bot
Cisco Connect 2018 Indonesia - Build a spark bot
 
クラウドを活用したセンシング/モニタリングなどデータ分析の実現
クラウドを活用したセンシング/モニタリングなどデータ分析の実現クラウドを活用したセンシング/モニタリングなどデータ分析の実現
クラウドを活用したセンシング/モニタリングなどデータ分析の実現
 
MAE301_Boom for your Buck
MAE301_Boom for your BuckMAE301_Boom for your Buck
MAE301_Boom for your Buck
 
[db tech showcase Tokyo 2018] #dbts2018 #C32 『Deep Dive on the Amazon Aurora ...
[db tech showcase Tokyo 2018] #dbts2018 #C32 『Deep Dive on the Amazon Aurora ...[db tech showcase Tokyo 2018] #dbts2018 #C32 『Deep Dive on the Amazon Aurora ...
[db tech showcase Tokyo 2018] #dbts2018 #C32 『Deep Dive on the Amazon Aurora ...
 
Keith Steward - SageMaker Algorithms Infinitely Scalable Machine Learning_VK.pdf
Keith Steward - SageMaker Algorithms Infinitely Scalable Machine Learning_VK.pdfKeith Steward - SageMaker Algorithms Infinitely Scalable Machine Learning_VK.pdf
Keith Steward - SageMaker Algorithms Infinitely Scalable Machine Learning_VK.pdf
 

Recently uploaded

Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 

Recently uploaded (20)

Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 

Let's LL

  • 1. Copyright © 2017 SG Corporation. All right reserved. Let’s LL 第二事業部 市岡岳彦 2017/2/3
  • 2. Copyright © 2017 SG Corporation. All right reserved. 本資料の内容は(株)エス・ジー社員の 市岡岳彦の個人的見解であり、 (株)エス・ジーの公式見解ではありません。 2017/2/3 2
  • 3. Copyright © 2017 SG Corporation. All right reserved. LL? 2017/2/3 3
  • 4. Copyright © 2017 SG Corporation. All right reserved. Lightweight Language 2017/2/3 4
  • 5. Copyright © 2017 SG Corporation. All right reserved. Lightweight 2017/2/3 5
  • 6. Copyright © 2017 SG Corporation. All right reserved. Language 2017/2/3 6
  • 7. Copyright © 2017 SG Corporation. All right reserved. スクリプト言語とか 2017/2/3 7
  • 8. Copyright © 2017 SG Corporation. All right reserved. 動的型言語とか 言われてたもの 2017/2/3 8
  • 9. Copyright © 2017 SG Corporation. All right reserved. PHP,JavaScript, Python,Ruby,… 2017/2/3 9
  • 10. Copyright © 2017 SG Corporation. All right reserved. でも 2017/2/3 10
  • 11. Copyright © 2017 SG Corporation. All right reserved. 巷間伝えるところ 2017/2/3 11
  • 12. Copyright © 2017 SG Corporation. All right reserved. 変数に型がないと わかりにくいよ 2017/2/3 12
  • 13. Copyright © 2017 SG Corporation. All right reserved. コンパイル時の 型安全性が確保できない 2017/2/3 13
  • 14. Copyright © 2017 SG Corporation. All right reserved. 勝手に型が変換されて よくわからない 2017/2/3 14
  • 15. Copyright © 2017 SG Corporation. All right reserved. とかね 2017/2/3 15
  • 16. Copyright © 2017 SG Corporation. All right reserved. disってても 仕方がないので 2017/2/3 16
  • 17. Copyright © 2017 SG Corporation. All right reserved. まずは静的型言語を 見てみよう 2017/2/3 17
  • 18. Copyright © 2017 SG Corporation. All right reserved. printf(“%s:%dn”, “orange”, 5); 2017/2/3 18
  • 19. Copyright © 2017 SG Corporation. All right reserved. これは変だ 2017/2/3 19
  • 20. Copyright © 2017 SG Corporation. All right reserved. printf(“%s:%dn”, “orange”, 5); Cの可変長引数は型安全じゃない 2017/2/3 20
  • 21. Copyright © 2017 SG Corporation. All right reserved. System.out.println(“orange:” + 5); 2017/2/3 21
  • 22. Copyright © 2017 SG Corporation. All right reserved. これは変だ 2017/2/3 22
  • 23. Copyright © 2017 SG Corporation. All right reserved. System.out.println(“orange:” + 5); Javaは演算子オーバーロードは ないはずなのに? 2017/2/3 23
  • 24. Copyright © 2017 SG Corporation. All right reserved. もうちょっと 見てみよう 2017/2/3 24
  • 25. Copyright © 2017 SG Corporation. All right reserved. Cでは… 0がfalseで 0以外はtrue 2017/2/3 25
  • 26. Copyright © 2017 SG Corporation. All right reserved. Cでは… 文字列に’0’が 出現したら終端 2017/2/3 26
  • 27. Copyright © 2017 SG Corporation. All right reserved. ですよねー 2017/2/3 27
  • 28. Copyright © 2017 SG Corporation. All right reserved. 静的型言語も 2017/2/3 28
  • 29. Copyright © 2017 SG Corporation. All right reserved. 変なルールが いっぱいあるよ 2017/2/3 29
  • 30. Copyright © 2017 SG Corporation. All right reserved. お互い様だね 2017/2/3 30
  • 31. Copyright © 2017 SG Corporation. All right reserved. それはそうと 2017/2/3 31
  • 32. Copyright © 2017 SG Corporation. All right reserved. 人々は言う 2017/2/3 32
  • 33. Copyright © 2017 SG Corporation. All right reserved. 型がない 2017/2/3 33
  • 34. Copyright © 2017 SG Corporation. All right reserved. 正確に言うと 2017/2/3 34
  • 35. Copyright © 2017 SG Corporation. All right reserved. 変数に型がない 2017/2/3 35
  • 36. Copyright © 2017 SG Corporation. All right reserved. と言うか 2017/2/3 36
  • 37. Copyright © 2017 SG Corporation. All right reserved. プログラミングスタイル の違いとして 2017/2/3 37
  • 38. Copyright © 2017 SG Corporation. All right reserved. 型を変数の属性と みなすか 2017/2/3 38
  • 39. Copyright © 2017 SG Corporation. All right reserved. 型を値の属性と みなすか 2017/2/3 39
  • 40. Copyright © 2017 SG Corporation. All right reserved. 型がないわけじゃない 2017/2/3 40
  • 41. Copyright © 2017 SG Corporation. All right reserved. えーと 2017/2/3 41
  • 42. Copyright © 2017 SG Corporation. All right reserved. [Pythonの場合] x = 'banana' print type(x) # <type 'str'> x = 2357 print type(x) # <type 'int'> 2017/2/3 42
  • 43. Copyright © 2017 SG Corporation. All right reserved. [PyObject構造体] typedef struct _object { PyObject_HEAD } PyObject; typedef struct { PyObject_HEAD long ob_ival; } PyIntObject; 2017/2/3 43
  • 44. Copyright © 2017 SG Corporation. All right reserved. Pythonの内部構造::PyObject http://postd.cc/python- internals-pyobject/ 2017/2/3 44
  • 45. Copyright © 2017 SG Corporation. All right reserved. これはそれほど 驚くことでもない 2017/2/3 45
  • 46. Copyright © 2017 SG Corporation. All right reserved. JavaやC#プログラマだって 2017/2/3 46
  • 47. Copyright © 2017 SG Corporation. All right reserved. 意識してることだよね 2017/2/3 47
  • 48. Copyright © 2017 SG Corporation. All right reserved. してるよね 2017/2/3 48
  • 49. Copyright © 2017 SG Corporation. All right reserved. しろよ 2017/2/3 49
  • 50. Copyright © 2017 SG Corporation. All right reserved. Object型であれば なんだって入るからね 2017/2/3 50
  • 51. Copyright © 2017 SG Corporation. All right reserved. [Javaの場合] Object obj = "grape"; System.out.println(obj.getClass()); // class java.lang.String obj = 1234; System.out.println(obj.getClass()); // class java.lang.Integer 2017/2/3 51
  • 52. Copyright © 2017 SG Corporation. All right reserved. それを踏まえて 2017/2/3 52
  • 53. Copyright © 2017 SG Corporation. All right reserved. [Pythonの場合] a = ‘banana' # <type 'str'> b = 2357 # <type 'int'> 2017/2/3 53
  • 54. Copyright © 2017 SG Corporation. All right reserved. 変数宣言と同時に 代入によって 2017/2/3 54
  • 55. Copyright © 2017 SG Corporation. All right reserved. 暗黙の型宣言がなされて いるようなもの 2017/2/3 55
  • 56. Copyright © 2017 SG Corporation. All right reserved. [Pythonの場合] str a = ‘banana' int b = 2357 2017/2/3 56
  • 57. Copyright © 2017 SG Corporation. All right reserved. LLプログラマには コードがこう見えてる 2017/2/3 57
  • 58. Copyright © 2017 SG Corporation. All right reserved. ところで 2017/2/3 58
  • 59. Copyright © 2017 SG Corporation. All right reserved. コンパイル時の 型安全性が確保できない 2017/2/3 59
  • 60. Copyright © 2017 SG Corporation. All right reserved. って、言ってたよね 2017/2/3 60
  • 61. Copyright © 2017 SG Corporation. All right reserved. いつ 型チェックをするか? 2017/2/3 61
  • 62. Copyright © 2017 SG Corporation. All right reserved. 「実行時」です 2017/2/3 62
  • 63. Copyright © 2017 SG Corporation. All right reserved. 彼らはなぜ 2017/2/3 63
  • 64. Copyright © 2017 SG Corporation. All right reserved. それで問題ないと 主張するのか? 2017/2/3 64
  • 65. Copyright © 2017 SG Corporation. All right reserved. 「テストファースト」 2017/2/3 65
  • 66. Copyright © 2017 SG Corporation. All right reserved. ここ重要 2017/2/3 66
  • 67. Copyright © 2017 SG Corporation. All right reserved. ユニットテストの テストケースがない コードは 2017/2/3 67
  • 68. Copyright © 2017 SG Corporation. All right reserved. 信用できない 2017/2/3 68
  • 69. Copyright © 2017 SG Corporation. All right reserved. ユニットテストは 2017/2/3 69
  • 70. Copyright © 2017 SG Corporation. All right reserved. コンパイラの 検証より有用 2017/2/3 70
  • 71. Copyright © 2017 SG Corporation. All right reserved. 強力な柔軟性を 手に入れつつ 2017/2/3 71
  • 72. Copyright © 2017 SG Corporation. All right reserved. プログラムの動作を 担保する 2017/2/3 72
  • 73. Copyright © 2017 SG Corporation. All right reserved. じゃあ 2017/2/3 73
  • 74. Copyright © 2017 SG Corporation. All right reserved. 柔軟性って? 2017/2/3 74
  • 75. Copyright © 2017 SG Corporation. All right reserved. 「ダックタイピング」 2017/2/3 75
  • 76. Copyright © 2017 SG Corporation. All right reserved. class Duck: def sound(self): return 'quack' def test(foo): print foo.sound() test(Duck()) # quack 2017/2/3 76
  • 77. Copyright © 2017 SG Corporation. All right reserved. インターフェースと なにが違うの? 2017/2/3 77
  • 78. Copyright © 2017 SG Corporation. All right reserved. インターフェースは 一度決めると 後から変えるのが大変 2017/2/3 78
  • 79. Copyright © 2017 SG Corporation. All right reserved. はじめに全てが分かって いるわけではない 2017/2/3 79
  • 80. Copyright © 2017 SG Corporation. All right reserved. 継承関係は必要ない 2017/2/3 80
  • 81. Copyright © 2017 SG Corporation. All right reserved. 型宣言による 強制ではなく 2017/2/3 81
  • 82. Copyright © 2017 SG Corporation. All right reserved. コメントとユニットテスト によるドキュメント化 2017/2/3 82
  • 83. Copyright © 2017 SG Corporation. All right reserved. より柔軟な クラス間の協調 2017/2/3 83
  • 84. Copyright © 2017 SG Corporation. All right reserved. … 2017/2/3 84
  • 85. Copyright © 2017 SG Corporation. All right reserved. とはいえ 2017/2/3 85
  • 86. Copyright © 2017 SG Corporation. All right reserved. 最近の傾向は 2017/2/3 86
  • 87. Copyright © 2017 SG Corporation. All right reserved. 両者いいとこ取り 2017/2/3 87
  • 88. Copyright © 2017 SG Corporation. All right reserved. 「タイプヒンティング」 2017/2/3 88
  • 89. Copyright © 2017 SG Corporation. All right reserved. PHP 2017/2/3 89
  • 90. Copyright © 2017 SG Corporation. All right reserved. PHP7から タイプヒンティング ではなく 2017/2/3 90
  • 91. Copyright © 2017 SG Corporation. All right reserved. 型宣言という ふつうの用語になって しまいましたが 2017/2/3 91
  • 92. Copyright © 2017 SG Corporation. All right reserved. 型宣言なし 2017/2/3 92
  • 93. Copyright © 2017 SG Corporation. All right reserved. function sum($a, $b) { return $a + $b; } sum(1.5, 2.5); # 4 2017/2/3 93
  • 94. Copyright © 2017 SG Corporation. All right reserved. 弱い型チェック 2017/2/3 94
  • 95. Copyright © 2017 SG Corporation. All right reserved. function sum(int $a, int $b) { return $a + $b; } sum(1.5, 2.5); # 3 2017/2/3 95
  • 96. Copyright © 2017 SG Corporation. All right reserved. 強い型チェック 2017/2/3 96
  • 97. Copyright © 2017 SG Corporation. All right reserved. declare(strict_types=1); function sum(int $a, int $b) { return $a + $b; } sum(1.5, 2.5); # 実行時エラー 2017/2/3 97
  • 98. Copyright © 2017 SG Corporation. All right reserved. 型チェックの強度を 選ぶことができる 2017/2/3 98
  • 99. Copyright © 2017 SG Corporation. All right reserved. コメントによる型宣言 2017/2/3 99
  • 100. Copyright © 2017 SG Corporation. All right reserved. 「Closure Compiler」 https://developers.google.com/closure/comp iler/ 2017/2/3 100
  • 101. Copyright © 2017 SG Corporation. All right reserved. JavaScript 2017/2/3 101
  • 102. Copyright © 2017 SG Corporation. All right reserved. function sum(a, b) { return a + b; } 2017/2/3 102
  • 103. Copyright © 2017 SG Corporation. All right reserved. JSDocの アノテーションで 2017/2/3 103
  • 104. Copyright © 2017 SG Corporation. All right reserved. /** * @param {number} a * @param {number} b * @return {number} */ function sum(a, b) { return a + b; } 2017/2/3 104
  • 105. Copyright © 2017 SG Corporation. All right reserved. とか 2017/2/3 105
  • 106. Copyright © 2017 SG Corporation. All right reserved. function /** number */ sum( /** number */ a, /** number */ b) { return a + b; } 2017/2/3 106
  • 107. Copyright © 2017 SG Corporation. All right reserved. とか書ける 2017/2/3 107
  • 108. Copyright © 2017 SG Corporation. All right reserved. 言語仕様の外側に 型チェックを設ける 2017/2/3 108
  • 109. Copyright © 2017 SG Corporation. All right reserved. 型推論 2017/2/3 109
  • 110. Copyright © 2017 SG Corporation. All right reserved. C# 2017/2/3 110
  • 111. Copyright © 2017 SG Corporation. All right reserved. Dictionary<string, string> dict = new Dictionary<string, string>() { { "banana", "yellow" }, { "apple", "red" }, { "orange", "orange" } }; foreach (KeyValuePair<string, string> elem in dict) { Console.WriteLine(elem.Key + ":" + elem.Value); } 2017/2/3 111
  • 112. Copyright © 2017 SG Corporation. All right reserved. dictとelemの型は 文脈から推論できる 2017/2/3 112
  • 113. Copyright © 2017 SG Corporation. All right reserved. [dict] Dictionary<string, string> コンストラクタが返す型 2017/2/3 113
  • 114. Copyright © 2017 SG Corporation. All right reserved. var dict = new Dictionary<string, string>() { { "banana", "yellow" }, { "apple", "red" }, { "orange", "orange" } }; foreach (KeyValuePair<string, string> elem in dict) { Console.WriteLine(elem.Key + ":" + elem.Value); } 2017/2/3 114
  • 115. Copyright © 2017 SG Corporation. All right reserved. [elem] dictからforeachで取り出されて Key,Valueプロパティを 持っているような型 2017/2/3 115
  • 116. Copyright © 2017 SG Corporation. All right reserved. var dict = new Dictionary<string, string>() { { "banana", "yellow" }, { "apple", "red" }, { "orange", "orange" } }; foreach (var elem in dict) { Console.WriteLine(elem.Key + ":" + elem.Value); } 2017/2/3 116
  • 117. Copyright © 2017 SG Corporation. All right reserved. 間違ってると 2017/2/3 117
  • 118. Copyright © 2017 SG Corporation. All right reserved. 実行時ではなく 2017/2/3 118
  • 119. Copyright © 2017 SG Corporation. All right reserved. コンパイル時に エラーになるよ 2017/2/3 119
  • 120. Copyright © 2017 SG Corporation. All right reserved. じゃあ、まとめ 2017/2/3 120
  • 121. Copyright © 2017 SG Corporation. All right reserved. 型の強制をプログラマが 制御できることにより 2017/2/3 121
  • 122. Copyright © 2017 SG Corporation. All right reserved. 選択の幅が広がる 2017/2/3 122
  • 123. Copyright © 2017 SG Corporation. All right reserved. APIの インターフェースは 型宣言 2017/2/3 123
  • 124. Copyright © 2017 SG Corporation. All right reserved. ローカル変数の 型宣言はてきとうに 2017/2/3 124
  • 125. Copyright © 2017 SG Corporation. All right reserved. とかね 2017/2/3 125
  • 126. Copyright © 2017 SG Corporation. All right reserved. 参考文献 オブジェクト指向設計実践ガイド ~Rubyでわかる 進化しつづける柔軟なアプリケーションの育て方 Sandi Metz 著,髙山泰基 訳 技術評論社 2017/2/3 126
  • 127. Copyright © 2017 SG Corporation. All right reserved. (株)エス・ジー http://www.sgnet.co.jp ブログ http://blog.sgnet.co.jp 2017/2/3 127