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
87
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
220
Difference Algorithm
horitayuya
11
5.6k
iOS11でのHEVC動画のHLS配信
horitayuya
2
1.6k
Featured
See All Featured
Producing Creativity
orderedlist
PRO
343
39k
Writing Fast Ruby
sferik
628
61k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
960
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Designing for Performance
lara
604
68k
Thoughts on Productivity
jonyablonski
68
4.4k
Designing for humans not robots
tammielis
250
25k
How STYLIGHT went responsive
nonsquared
96
5.3k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Documentation Writing (for coders)
carmenintech
67
4.5k
BBQ
matthewcrist
85
9.4k
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 ΛಡΉ͖͔͚ͬʹͳͬͨ ͠ྑ͔ͬͨΒຑ܅ͷ࣮ݟͯΈ͍ͯͩ͘͞🤲