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
elmから学ぼう
Search
mather
April 04, 2016
Programming
1
250
elmから学ぼう
関数型リアクティブなフロントエンド言語であるelmの紹介
mather
April 04, 2016
Tweet
Share
More Decks by mather
See All by mather
SolidjsでLeacTion!を作り直しました / Rebuilt LeacTion! in Solid.js
mather
0
300
Webフレームワークの功罪 / Advantages and considerable point of Web Frameworks
mather
0
420
LeacTion!のアップデートとプチ勉強会へのいざない / Updates of LeacTion and Petit Meetup
mather
0
450
LeacTion!について / About LeacTion!
mather
0
310
Rubyでワンライナー / One-liner on Ruby
mather
0
440
認知と思考パターン / Cognition and Pattern
mather
1
270
「モデル」を考える / Think about "model"
mather
0
370
Shall we make a speech?
mather
0
230
Elmでライフゲーム / LifeGame in Elm
mather
1
1k
Other Decks in Programming
See All in Programming
Kamal 2 – Get Out of the Cloud
aleksandrov
1
180
Unlock the Potential of Swift Code Generation
rockname
0
240
Being an ethical software engineer
xgouchet
PRO
0
210
Deoptimization: How YJIT Speeds Up Ruby by Slowing Down / RubyKaigi 2025
k0kubun
0
500
Devin入門と最近のアップデートから見るDevinの進化 / Introduction to Devin and the Evolution of Devin as Seen in Recent Update
rkaga
9
4.8k
DataStoreをテストする
mkeeda
0
280
Develop Faster With FrankenPHP
dunglas
2
3.2k
Vibe Codingをせずに Clineを使っている
watany
17
6.1k
Chrome Extension Techniques from Hell
moznion
1
160
Compose Hot Reload is here, stop re-launching your apps! (Android Makers 2025)
zsmb
1
480
生成AIを使ったQAアプリケーションの作成 - ハンズオン補足資料
oracle4engineer
PRO
3
200
PHPバージョンアップから始めるOSSコントリビュート / how2oss-contribute
dmnlk
1
990
Featured
See All Featured
Designing Experiences People Love
moore
141
24k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
2.9k
The Cult of Friendly URLs
andyhume
78
6.3k
How to train your dragon (web standard)
notwaldorf
91
6k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
Six Lessons from altMBA
skipperchong
27
3.7k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Typedesign – Prime Four
hannesfritz
41
2.6k
A Tale of Four Properties
chriscoyier
158
23k
Making Projects Easy
brettharned
116
6.1k
4 Signs Your Business is Dying
shpigford
183
22k
Documentation Writing (for coders)
carmenintech
69
4.7k
Transcript
elm͔Βֶ΅͏ 2016/04/02 ܂ാ ӳࢿ #satoimo
ࣗݾհ • ܂ാ ӳࢿ (32) • גࣜձࣾΞϥλφ • ීஈόοΫΤϯυͬͯ·͢ •
Scalaͱ͔Haskellͱ͔ • ΧϝϥͱεΩϡʔόμΠϏϯά͕झຯ
ࠓͷ༰ • elmͷհ • σϞ • ؔܕͱϦΞΫςΟϒ • ·ͱΊ
elm
elm • http://elm-lang.org/ • ·ͩൃల్্(ݱࡏver. 0.16.0)ͳݴޠ • ؔܕϦΞΫςΟϒͳϑϩϯτΤϯυݴޠ • HTML,
JavaScript(, CSS)Λੜ͢Δ • HaskellϥΠΫͳهड़͕Ͱ͖Δ
લஔ͖ • elm·࣮ͩ༻తͳஈ֊Ͱ͋Γ·ͤΜ • elm͕͑ͳͯ͘ྑ͍Ͱ͢ • Τοηϯε͚ͩͳΜͱͳ͘Θ͔ͬͯ͘ΕΔͱ͋ Γ͕͍ͨͰ͢(^_^ʎ
σϞ
TodoMVC (ެࣜσϞ)
ྃͨ͠λεΫΛআ ະྃͷλεΫ ͲͷλεΫ͕ݟΕΔঢ়ଶ͔ʁ λεΫ ྃͨ͠ʁ λεΫϦετ
ؔܕͱϦΞΫςΟϒ
ঢ়ଶͷͱෳࡶ͞ • ཧ͢Δঢ়ଶͷ͕ଟ͍ˠෳࡶʹͳΔ • ϑϥάͷཧɺදࣔ༻ͷɺetc… • ࣮ࡍʹผͷঢ়ଶʹґଘ͍ͯ͠Δ͜ͱ • ґଘ͍ͯ͠Δͣͷঢ়ଶ͕ಉظ࿙Εˠόά •
ෳͷঢ়ଶΛಉظ͢ΔͨΊͷίʔυ͕૿͑Δ
ґଘ͍ͯ͠Δͣͷঢ়ଶ var str = “hoge”; var len = str.length; var
str = “fugafuga”; if (str.length === len) { // 正常 } else { // 例外処理!? }
ཧ͢Δঢ়ଶΛ࠷খݶʹ͢Δ ΞϓϦέʔγϣϯͷ શͯͷঢ়ଶ ҰͭͷλεΫͷ ঢ়ଶ
ঢ়ଶ͔ΒΛಋ͘ λεΫϦετΛ༩͑Δͱʜ ඞཁͳΛλεΫϦετ͔Β ಋ͖ग़ͯ͠ʜ )5.-Λॻ͖ग़͢ ؔܕ 'VODUJPOBM
ΞΫγϣϯͷͨͼʹ࣍ͷঢ়ଶ "DUJPOΛड͚ͯࠓͷঢ়ଶ͔Β ৽͍͠ঢ়ଶ ʢߋ৽͠ͳ͍ʣ
ΞΫγϣϯܾΊ͓ͯ͘
Ͳ͏ͬͯߋ৽͢Δʁ .PEFM .PEFM .PEFM λεΫՃ λεΫྃ ྃࡁΈ λεΫআ ೖྗ͞ΕͨΞΫγϣϯʹ Ԡͯ͠৽͍͠ঢ়ଶʹ͢Δ
ʹϦΞΫςΟϒ(Reactive)
·ͱΊ
ϦΞΫςΟϒདྷͯ·͢ • ϦΞΫςΟϒͩΜͩΜਁಁ͖ͯͨ͠ • React.jsͱͦͷϑϨʔϜϫʔΫ(Flux) • FluxϑϨʔϜϫʔΫͷҰͭReduxelmΛࢀ ߟʹ͍ͯ͠Δ
ঢ়ଶΛѲͯ͠·͔͢ʁ • Β͵ؒʹ૿͑Δϑϥά • ঢ়ଶύλʔϯͷݟམͱ͠ɾෆ߹ • ͦΕɺؔܕͷߟ͑ํͰ͍͚·͢Αʁ • ඞཁͳঢ়ଶΛߜΓࠐΉ •
ঢ়ଶ͔ΒΛऔΓग़͢Α͏ʹ͢Δ
͋Γ͕ͱ͏͍͟͝·ͨ͠