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
290
Webフレームワークの功罪 / Advantages and considerable point of Web Frameworks
mather
0
400
LeacTion!のアップデートとプチ勉強会へのいざない / Updates of LeacTion and Petit Meetup
mather
0
440
LeacTion!について / About LeacTion!
mather
0
310
Rubyでワンライナー / One-liner on Ruby
mather
0
430
認知と思考パターン / Cognition and Pattern
mather
1
260
「モデル」を考える / Think about "model"
mather
0
370
Shall we make a speech?
mather
0
220
Elmでライフゲーム / LifeGame in Elm
mather
1
990
Other Decks in Programming
See All in Programming
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
9
2.2k
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
790
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
330
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
2
330
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
120
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
2
290
Amazon S3 TablesとAmazon S3 Metadataを触ってみた / 20250201-jawsug-tochigi-s3tables-s3metadata
kasacchiful
0
170
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
120
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
220
負債になりにくいCSSをデザイナとつくるには?
fsubal
10
2.4k
CDK開発におけるコーディング規約の運用
yamanashi_ren01
2
140
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
130
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Six Lessons from altMBA
skipperchong
27
3.6k
Fireside Chat
paigeccino
34
3.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
It's Worth the Effort
3n
184
28k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
330
Faster Mobile Websites
deanohume
306
31k
Thoughts on Productivity
jonyablonski
69
4.5k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
How to Ace a Technical Interview
jacobian
276
23k
Embracing the Ebb and Flow
colly
84
4.6k
Facilitating Awesome Meetings
lara
52
6.2k
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Λࢀ ߟʹ͍ͯ͠Δ
ঢ়ଶΛѲͯ͠·͔͢ʁ • Β͵ؒʹ૿͑Δϑϥά • ঢ়ଶύλʔϯͷݟམͱ͠ɾෆ߹ • ͦΕɺؔܕͷߟ͑ํͰ͍͚·͢Αʁ • ඞཁͳঢ়ଶΛߜΓࠐΉ •
ঢ়ଶ͔ΒΛऔΓग़͢Α͏ʹ͢Δ
͋Γ͕ͱ͏͍͟͝·ͨ͠