Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Dart in なごやまつり
Search
Tomochika Hara
August 25, 2013
Technology
0
50
Dart in なごやまつり
2013/08/25 なごやまつり
https://connpass.com/event/2414/
Tomochika Hara
August 25, 2013
Tweet
Share
More Decks by Tomochika Hara
See All by Tomochika Hara
Swiftでつくるファミコンエミュレータのススメ
thara
3
2k
モバイルゲーム開発と Google App Engine
thara
0
300
GCPとAWSの比較
thara
0
110
Dart VM と Optional Typing
thara
0
330
Dartの基本
thara
0
57
Dart言語仕様 Pick-up
thara
0
460
Future & Stream in Dart
thara
0
380
Other Decks in Technology
See All in Technology
Amazon FSx for NetApp ONTAPを利用するにあたっての要件整理と設計のポイント
non97
1
130
Databricksで構築する初めての複合AIシステム - ML15min
taka_aki
2
1.3k
入門『状態』#kaigionrails / "state" for beginners with Rails
shinkufencer
2
810
TinyMLの技術動向
kyotomon
2
260
来年もre:Invent2024 に行きたいあなたへ - “集中”と“つながり”で楽しむ -
ny7760
0
110
[PyCon Korea 2024] Lightning Talk: PyPI패키지를 의심하세요
studioego
PRO
0
130
WHOLENESS, REPAIRING, AND TO HAVE FUN: 全体性、修復、そして楽しむこと
snoozer05
PRO
3
3.6k
Overview of file type identifiers
ange
0
210
都市伝説バスターズ「WebアプリのボトルネックはDBだから言語の性能は関係ない」 - Kaigi on Rails 2024
osyoyu
13
4.8k
Aurora_BlueGreenDeploymentsやってみた
tsukasa_ishimaru
1
120
CyberAgent 生成AI Deep Dive with Amazon Web Services / genai-aws
cyberagentdevelopers
PRO
1
360
CAMERA-Suite: 広告文生成のための評価スイート / ai-camera-suite
cyberagentdevelopers
PRO
3
230
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
31
6.3k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
Designing the Hi-DPI Web
ddemaree
280
34k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Raft: Consensus for Rubyists
vanstee
136
6.6k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
167
49k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Producing Creativity
orderedlist
PRO
341
39k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
328
21k
Designing for Performance
lara
604
68k
Become a Pro
speakerdeck
PRO
24
4.9k
Transcript
Dartの型システム @zetta1985 原 知愛 Dart / Java / JS /
DDD / REST Google信者 #SugoiH_c0hama #nagoya.dart 2013/08/25 なごやまつり
Dart Runtime Dart Code Dart VM Snapshot dart2js JavaScript V8
etc...
Isolates Isolate Receive Port Isolate Receive Port Send Port Send
Port Snap shot Snap shot
Development Tools Dart Editor Dartium (Browser) Dart SDK Dart VM
dart2js dart analyzer dartdoc Pub (Package Manager) Eclipse Plugin IntellJ IDEA Plugin
Language Spec 基本はゆるふわなJava • 言語設計者はGilad Bracha氏 ◦ Java言語仕様 ◦ JavaVM仕様
◦ Pluggable (Optional) Type System提唱 • 他、Jochua J. Bloch氏(Effective Javaの人)も
Language Spec • Optional Parameter • Named Parameter • Method
Cascading • Const Variable • Generics • Named Constructor • Factory Constructor • Library Private • Implicit Interface • Mix-in
動的型付言語(実行環境) + 型検査器(ツール) || Optional Typing
Java-likeなLL(Dart VM) + dartanalyzer || Dart
良い所 Future & Stream API
Future: File IO new File("./foo.txt").fullPath() .then((fullpath) { print("foo.txt's fullpath is
$fullpath"); }) .catchError((e) { print("foo.txt is not exists."); });
Future: HTTP Request new HttpClient().getUrl(url).then((req){ req.headers.add("contentType", "text/html"); return req.close(); }).then((res)
{ res.transform( new StringDecoder()).forEach(print); });
Stream: Standard Input print("Please Input A."); var lines = stdin
.transform(new StringDecoder()) .transform(new LineSplitter()); lines.listen((str){ print("Your input's length : ${str.length}"); print(str == "A" ? "Just A." : "Not A."); });
Stream: DOM Event var stream = query("input#hello").onClick; stream.listen((e) { window.alert("hello,
world."); });
Stream: HTTP Server HttpServer.bind("127.0.0.1", 8080).then((server) { server.listen((req) { req.response.write("This message
from my server."); req.response.close(); }); });
Stream: File Read Stream<List<int> stream = new File('bar.txt').openRead(); StreamSubscription<List<int>> subscription;
subscription = stream.listen((bytes) { for (var b in bytes) { print(new String.fromCharCode(b)); if (b == '#'.codeUnitAt(0)) { subscription.cancel(); return; } } });
DartとGoogle • Dartの一番のUserは、Google自身 • SPDYのような普及方法を目指す? • GoogleはWebエンジニアと共に、 Web開発の未来を作りたい。 • JavaScriptを駆逐するわけではない
Dartのこれから • dartanalyzerをもっと進化させたい (個人的に) • Chromeにさえ乗っかれば・・・ • Google App Engine対応が気になる
• Android対応すればワンチャンあるで
Thanks