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
Into the Great Unknown - MozCon
thekraken
32
1.5k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
What's new in Ruby 2.0
geeforr
343
31k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
It's Worth the Effort
3n
183
27k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
The World Runs on Bad Software
bkeepers
PRO
65
11k
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 ΛಡΉ͖͔͚ͬʹͳͬͨ ͠ྑ͔ͬͨΒຑ܅ͷ࣮ݟͯΈ͍ͯͩ͘͞🤲