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
mahjong-kun.pdf
Search
YuyaHorita
March 04, 2022
0
86
mahjong-kun.pdf
YuyaHorita
March 04, 2022
Tweet
Share
More Decks by YuyaHorita
See All by YuyaHorita
Apollo_Code_Generation [jp]
horitayuya
0
2.3k
Apollo_Code_Generation [en]
horitayuya
0
210
Difference Algorithm
horitayuya
11
5.6k
iOS11でのHEVC動画のHLS配信
horitayuya
2
1.6k
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
A Philosophy of Restraint
colly
203
16k
Intergalactic Javascript Robots from Outer Space
tanoku
268
27k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
A designer walks into a library…
pauljervisheath
202
24k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
Code Review Best Practice
trishagee
64
17k
Six Lessons from altMBA
skipperchong
26
3.5k
How to Think Like a Performance Engineer
csswizardry
19
1.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Transcript
ຑͷܕ͔ΒֶͿ 5ZQF4DSJQU
໊લງా༗࠸ ݄.ೖࣾ ۙͷϓϩδΣΫτ.1BZɺ৺ଁ܅ UZQFDIBMMFOHFTΛগ͍ͣͭͬͯ͠Δ NFEJVNͷޙ͘Β͍·ͰEPOF લ৬αΠόʔΤʔδΣϯτ ຑ෦͕͋Γॴଐͯͨ͠ ్த͔Β༓ྶ෦һʹ IUUQTHJUIVCDPNUZQFDIBMMFOHFTUZQFDIBMMFOHFT
खṛͷຕͷṛͰΛ࡞Ε0,ɺ͕͑Δ👍 ͔ͳΓͬ͘͟ΓɺҰݴͰຑϧʔϧͷհ ͭͷṛͷΈΛηοτ ࣈ֊ஈλΠϓ ຕಉ͡λΠϓ ຕಉ͡λΠϓ ͭͷṛͷΈΛηοτ
ࠓ͢͜ͱ ຑͷखṛΛೖྗͯ͠ɺͦͷखṛͷͷϦςϥϧܕΛฦ͢ܕΛ ࡞ͬͨɻ ௨শຑ܅BMQIB൛ ຑ܅࡞ͷաఔͱ5ZQF4DSJQUͷػೳɾݟΛհ͍ͨ͠ IUUQTHJUIVCDPNIPSJUBZVZBNBIKPOHLVO ࠓɺ͜ͷลΓͷύϥϝʔλͷׂѪ
ṛͷܕఆٛ खṛͷܕఆٛ ͭͷṛ͕ಉ͡ṛ͔νΣοΫ͢Δ ·ͱΊ ࣍
ṛͷఆٛ w -JUFSBM5ZQF w 5FNQMBUF-JUFSBM5ZQF
ṛͷܕఆٛ -JUFSBMܕɺͦͷ͔ࣗ͠ड͚͚ͳ͍ܕ lPzͱ͍͏-JUFSBMܕʹzPz͔͠ೖͰ͖ͳ͍ ܗؙ͕͍ͷͰʮPʯ -JUFSBM5ZQF
ṛͷܕఆٛ શ෦खಈͰఆٛʁ 5FNQMBUF-JUFSBM5ZQF ܕΛ5FNQMBUF-JUFSBMͷೖྗʹ͑Δɻ ࣈͷṛ̍ʙ·Ͱͷ͋Δɻ
ṛͷܕఆٛ w 5FNQMBUF-JUFSBM5ZQFʹ6OJPOܕΛ͢ͱͯ͠ධՁ͞Εͨ݁Ռͷ6OJPOʹͳΔ 6OJPOͷશ௨ΓͷΈ߹Θ͕ͤఆٛ͞ΕΔ 5FNQMBUF-JUFSBM5ZQF w ṛछྨ͋ΔͷͰɺ࣮ࡍb.BSL`ܕ6OJPOʹͳΔ͕ɺׂѪ
खṛͷܕఆٛ w "SSBZ5ZQF w 5VQMF5ZQF w (FOFSJDT w *OEFYFE"DDFTT5ZQFT
खṛͷܕఆٛ ྻܕ w ྻܕԿݸͷཁૉ͕͋Δ͔ɺίϯύΠϧ࣌ʹܾఆ͠ͳ͍ w λϓϧܕԿݸͷཁૉ͕͋Δ͔ɾԿ൪ͷΠϯσοΫεʹԿ ܕ͕͋Δ͔ɺίϯύΠϧ࣌ʹܾఆ͞ΕΔ λϓϧܕ IUUQTXXXUZQFTDSJQUMBOHPSHEPDTIBOECPPLPCKFDUTIUNMUVQMFUZQFT
λϓϧܕͰखࡳΛఆٛ͢ΔͱɺຕҎ֎ͷέʔε ͰίϯύΠϧΤϥʔʹͯ͘͠ΕΔͷͰྑ͍ खṛͷܕఆٛ
ͭͷṛͷΈͱͭͷṛͷΈʹղͰ͖Δ ͱɺ͞Βʹྑ͍ खṛͷܕఆٛ
(FOFSJDT ܕύϥϝʔλΛड͚औͬͯɺ৽͍͠ܕΛੜͰ͖Δ bFYUFOET`ΩʔϫʔυΛ͚Δ͜ͱͰೖྗύϥϝʔλʹ੍Λ͚ΒΕΔ खṛͷܕఆٛ
(FOFSJDT*OEFYFE"DDFTT5ZQFT AFYUFOET)BOEA੍ͷ͔͔͍ͬͯΔA5Aλϓϧܕ λϓϧܕΠϯσοΫεΞΫηεʹΑͬͯɺͦͷҐஔͰͷܕΛऔಘͰ͖Δ ྻܕͰ<> <>ͷΑ͏ʹΞΫηεग़དྷΔ͕ɺ5<> 5<>ͳͲΤϥʔʹͳΒͣʹ௨ͬͯ͠·͏ खṛͷܕఆٛ
ฒͼॱͷ੍͖͕ͩɺ खṛͷຕYηοτɺຕYηοτΛܕͰදݱͰ͖ͨ ޙɺͦΕͧΕͷ·ͱ·Γ͕݅Λຬ͔ͨ֬͢ೝ͢Ε0,
(FOFSJDT*OEFYFE"DDFTT5ZQFT खṛͷܕఆٛ
ͭͷṛ͕ಉ͡ṛ͔νΣοΫ͢Δ w $POEJUJPOBM5ZQFT w 5ZQF&RVJWBMFODF
ܕͷ߲ԋࢉࢠ ͷΑ͏ͳͷ ͭͷṛ͕ಉ͡ṛ͔νΣοΫ͢Δ $POEJUJPOBM5ZQFT 5ΛzPzʹೖग़དྷΔͳΒUSVFܕΛɺग़དྷͳ͍ͳΒGBMTFܕΛฦ͢ CPPMFBOܕͰͳ͘ɺUSVFͱGBMTFͷϦςϥϧܕ
ͭͷṛ͕ಉ͡ṛ͔νΣοΫ͢Δ $POEJUJPOBM5ZQFT ͱ͜ΖͰɺʮܕ͕ಉ͡ʯͷఆʹFYUFOETΛͬͯྑ͍ͷ͔ʁ
5ZQF&RVJWBMFODF Ұൠతʹ🙅 AAܕɺOVNCFSܕʹೖͰ͖ΔͷͰUSVFʹͳΔ AAܕɺAcAܕʹೖͰ͖ΔͷͰUSVFʹͳΔ ͨͩ͠ɺϦςϥϧܕ͕ͦΕ୯ମͰൺֱ͞ΕΔ߹ʹڐ༰ग़དྷΔ ͭͷṛ͕ಉ͡ṛ͔νΣοΫ͢Δ
ଞͷํ๏ແ͍ͷ͔ʁ
5ZQF&RVJWBMFODF UZQFDIBMMFOHFTͷਖ਼ղఆʹΘΕ͍ͯΔ&RVBMTܕ ͭͷṛ͕ಉ͡ṛ͔νΣοΫ͢Δ શͰແ͍͕ɺଟ͘ͷέʔεͰࠔΒͳͦ͏ͳϫʔΫΞϥϯυ IUUQTHJUIVCDPNNJDSPTPGU5ZQF4DSJQUJTTVFTJTTVFDPNNFOU
5ZQF&RVJWBMFODF IUUQTHJUIVCEFWNJDSPTPGU5ZQF4DSJQUCMPCNBJOTSDDPNQJMFSDIFDLFSUT- // 'T1 extends U1 ? X1 : Y1’
// 'T2 extends U2 ? X2 : Y2' are related if // one of T1 and T2 is related to the other, U1 and U2 are identical types, X1 is related to X2, // and Y1 is related to Y2. ͭͷ$POEJUJPOBM5ZQFͷൺֱʹ࣋ͪࠐΉ͜ͱͰɺ`JEFOUJDBM`͔Ͳ͏͔֬ೝग़དྷΔ ͭͷṛ͕ಉ͡ṛ͔νΣοΫ͢Δ
5ZQF&RVJWBMFODF ͭͷṛ͕ಉ͡ṛ͔νΣοΫ͢Δ `4`͕͞Ε͍ͯͳ͍ͷͰɺ`4FYUFOET5`ΛධՁग़དྷͳ͍ɻ `$IFDL`b4 4FYUFOET `ܕͱͯ͠ѻΘΕΔ ٻΊ͍ͯͨɺ$POEJUJPOBM5ZQFܕ 3FGFSFODFIUUQTXXXUZQFTDSJQUMBOHPSHEPDTIBOECPPLBEWBODFEUZQFTIUNMDPOEJUJPOBMUZQFT ʮDPOEJUJPOBMUZQFTBSFEFGFSSFEʯͰݕࡧ ެࣜυΩϡϝϯτ͕ͩɺEFQSFDBUFEɻ࠷৽ͷϖʔδͰࣅͨΑ͏ͳจষΛݟ͚ͭΒΕͳ͔ͬͨɻ
5ZQF&RVJWBMFODF ͭͷṛ͕ಉ͡ṛ͔νΣοΫ͢Δ `4`͕ύϥϝʔλͱͯ͠͞Εͨ݁Ռɺ`4FYUFOET5`͕ධՁ͞Εɺ ͨͩͷb `ܕʹͳΔͷͰɺ❌
ṛͷܕఆٛɺखṛͷܕఆٛɺṛͷܕಉ࢜ͷൺֱͳͲجૅ෦Λհͨ͠ ޙɺηοτɺηοτͷ݅ʹͳ͍ͬͯΔ͔ʁཱͯ͠ ͍Δ͔ʁϝϯθϯʁͲͷͪͰ্͕ͬͨʁϩϯ͔πϞ͔ʁූ͍͔ͭ͘ʁ Λఆ͢Δ͚ͩ ·ͱΊ IUUQTHJUIVCDPNNJDSPTPGU5ZQF4DSJQUJTTVFT IUUQTTQFBLFSEFDLDPNTBJZB@NPFCJVTUZQFTZTUFNPGUIFUZQFTDSJQU IUUQTXXXUZQFTDSJQUMBOHPSHEPDTIBOECPPLUZQFTGSPNUZQFTIUNM ਆࢿྉ ެࣜυΩϡϝϯτɺ๛Ͱ͔Γ͍͢
࡚͞Μͷ54ɻಛʹɺհ͞Ε͍ͯΔOFWFSͷ͍ํɺຊ൪ίʔυͰͱͯʹཱͭ 5ZQF&RVJWBMFODFͷɻ54ͷίʔυ DIFDLFSUT ΛಡΉ͖͔͚ͬʹͳͬͨ ͠ྑ͔ͬͨΒຑ܅ͷ࣮ݟͯΈ͍ͯͩ͘͞🤲