SlideShare a Scribd company logo
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 Group
Corentin Guillo
 
AWS Migration - As-Is Tool
AWS Migration - As-Is ToolAWS Migration - As-Is Tool
AWS Migration - As-Is Tool
Kenji 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 Trenches
ScrumDayLondon
 
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
Calvin 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 & Zipkin
VMware Tanzu
 
AWS Migration - General
AWS Migration - GeneralAWS Migration - General
AWS Migration - General
Kenji Morooka
 
AWS上でのオンラインゲームリリースガイド
AWS上でのオンラインゲームリリースガイドAWS上でのオンラインゲームリリースガイド
AWS上でのオンラインゲームリリースガイド
Amazon Web Services Japan
 
AWS Migration - Cost
AWS Migration - CostAWS Migration - Cost
AWS Migration - Cost
Kenji Morooka
 
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
Alex G. Lee, Ph.D. Esq. CLP
 
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
 
クラウドを活用したセンシング/モニタリングなどデータ分析の実現
クラウドを活用したセンシング/モニタリングなどデータ分析の実現クラウドを活用したセンシング/モニタリングなどデータ分析の実現
クラウドを活用したセンシング/モニタリングなどデータ分析の実現
崇之 清水
 
MAE301_Boom for your Buck
MAE301_Boom for your BuckMAE301_Boom for your Buck
MAE301_Boom for your Buck
Amazon Web Services
 
[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.pdf
Amazon 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

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 

Recently uploaded (20)

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 

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