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
Oh my Dart!
Search
Ladislav Thon
November 09, 2012
1
150
Oh my Dart!
Ladislav Thon
November 09, 2012
Tweet
Share
More Decks by Ladislav Thon
See All by Ladislav Thon
On Value Types or Why Reference Locality Matters
ladicek
0
33
Write Yourself an Annotation Processor
ladicek
0
38
Kotlin or The Quest For Java.Next
ladicek
0
170
Dart++
ladicek
0
130
Dart: The Dawn of Web Apps
ladicek
1
470
Dart: Preview
ladicek
0
81
Featured
See All Featured
How GitHub (no longer) Works
holman
310
140k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Producing Creativity
orderedlist
PRO
341
39k
Happy Clients
brianwarren
98
6.7k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Music & Morning Musume
bryan
46
6.2k
Raft: Consensus for Rubyists
vanstee
136
6.6k
GraphQLとの向き合い方2022年版
quramy
43
13k
Transcript
Come to the Dart side! We have cookies!
Oh my Dart! ladicek.github.com
Dart is made for
Dart is made for The modern web
Dart is made for Ease of use
Dart is made for Performance
Dart is made for Tooling
So Dart is a cool language
So Dart is a cool language Not really, no
So Dart is a cool language It's rather boring
Building blocks
Building blocks Braces & semicolons
Building blocks Variables
Building blocks Functions
Building blocks Closures
Building blocks Getters & setters
Building blocks Classes
Building blocks Libraries
Building blocks Event loop
Classes
Classes Lexically scoped this
Classes Named constructors
Classes Factory constructors
Classes Operators
Classes noSuchMethod
Classes Implicit interfaces
Classes Mixins (in the future)
Classes Mixin is a difference between a class and its
superclass
Libraries
Libraries Imported by URI
Libraries Can have more files
Typing
Typing Dynamic
Typing Optional type annotations
Typing Optional type annotations and generics
Typing Optional type annotations for documentation and tooling
Typing "Innocent until proven guilty"
Concurrency
Concurrency Single-threaded is good
Concurrency Single-threaded is good Except when it isn't
Concurrency No shared memory
Concurrency No shared memory Actors to the rescue
Concurrency No shared memory Actors Isolates
Concurrency "Isolated threads"
Concurrency Lightweight isolated threads
Concurrency Separate heaps and stacks
Concurrency Separate heaps and stacks Async communication
Privacy Based on names Only for libraries
Sugar Only the important right now
Sugar Nice to have not yet (maybe in the future)
Performance
Performance Fast startup
Performance Program elements are declared
Performance Diet parsing
Performance Snapshotting
Performance Compile-time constants
Performance Fast runtime
Performance Beats V8 already (on some benchmarks)
Performance And it's just the beginning
Tooling Dart Editor IntelliJ IDEA / WebStorm
None
So what is it all about?
So what is it all about? Structure!
ladicek.github.com ?
Async
Async Still very much open topic
Async Still very much open topic (not only in Dart)
Async Callbacks
Async Callbacks
Async Futures
Async Futures
Async await? async blocks? promise pipelining?
This isn't real Dart code! Future<List<int>> xAxis = db1.fetchData(100); Future<List<int>>
yAxis = db2.fetchData(100); async { List<int> xs <- xAxis; List<int> ys <- yAxis; plot(xs, ys); } catch (e) { doSomething(); }
Metaprogramming
Reflection Metaprogramming
Mirrors Reflection Metaprogramming
Mirrors Base level and meta level completely separated
Mirrors Introspecting functions, objects, classes, ...
Mirrors And other isolates!
Mirrors And other isolates! (Needs to be async...)
Mirrors Only in the VM right now
Mirrors Coming to dart2js
Mirrors Coming to dart2js But... optimizations?
Mirrors Builders (in the future)
Mirrors Builders (in the future) Creating/modifying code
Mirrors Debugging (in the future)
Mirrors Debugging (in the future) Introspecting the stack
Client side
Client side DOM reinvented
Client side DOM reinvented jQuery-like experience
Client side JS interop
Web Components
Web Components Templates
Web Components with data binding
Web Components and loops and conditionals
Web Components and event listeners
Web Components in plain old HTML
Web Components in plain old HTML (almost)
Web Components Components
Web Components = your own tags
Yes! Your own tags!
Web Components with templates
Web Components and Dart code
Server side
Server side Async IO, like in Node.js
Server side Filesystem access (files, directories, ...)
Server side Environment access (starting processes, ...)
Server side Network access (HTTP, WebSocket, ...)
Pub
Pub Package manager
Pub on the server
Pub and in the browser too!
Pub One or more libraries or an application
Pub semver.org
Pub Dependencies
Pub Dependencies with version locking
Community
Community dartflash
Community Buckshot
Community Rikulo
Community DartGap
Community three.dart
Community Spectre
Community DartBox2D
Community … … … … ... … … … ...
And much, much more!
ladicek.github.com ?