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
Goのソースコードから読み解くオブジェクト指向プログラミング@Object-Oriented ...
Search
arakawa
February 11, 2020
Programming
5
1.1k
Goのソースコードから読み解くオブジェクト指向プログラミング@Object-Oriented Conference 2020
arakawa
February 11, 2020
Tweet
Share
More Decks by arakawa
See All by arakawa
Goでテキストエディタを作った話@GDG Devfest2020
adsholoko
0
200
Other Decks in Programming
See All in Programming
Amazon Nova Reelの可能性
hideg
0
200
Запуск 1С:УХ в крупном энтерпрайзе: мечта и реальность ПМа
lamodatech
0
960
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
6
710
Flatt Security XSS Challenge 解答・解説
flatt_security
0
740
AHC041解説
terryu16
0
410
DevinとCursorから学ぶAIエージェントメモリーの設計とMoatの考え方
itarutomy
0
150
PicoRubyと暮らす、シェアハウスハック
ryosk7
0
230
Rubyでつくるパケットキャプチャツール
ydah
0
180
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
110
.NETでOBS Studio操作してみたけど…… / Operating OBS Studio by .NET
skasweb
0
120
Alba: Why, How and What's So Interesting
okuramasafumi
0
210
[JAWS-UG横浜 #80] うわっ…今年のServerless アップデート、少なすぎ…?
maroon1st
0
110
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
174
51k
What's in a price? How to price your products and services
michaelherold
244
12k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Scaling GitHub
holman
459
140k
A Tale of Four Properties
chriscoyier
157
23k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
192
16k
Agile that works and the tools we love
rasmusluckow
328
21k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Building Applications with DynamoDB
mza
93
6.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
Transcript
0CKFDU0SJFOUFE$POGFSFODF !͓ͷਫঁࢠେֶڞ (Pͷιʔείʔυ͔ΒಡΈղ͘ ΦϒδΣΫτࢦϓϩάϥϛϯά BETIPMPLP BETIPMPLP
ࣗݾհ 4IPHP"SBLBXB J04&OHJOFFS !4BOTBO BETIPMPLP BETIPMPLP
ࠓ͢͜ͱ w (Pͷιʔείʔυͷઃܭ͔ΒΦϒδΣΫτࢦͷΤοηϯεΛֶ΅͏ w ΦϒδΣΫτࢦͷҰͰ͋ΔσβΠϯύλʔϯʹ͍ͭͯ͠·͢ ϘτϜΞοϓͰΦϒδΣΫτࢦͷਅΛֶͿ
(Pʹ͍ͭͯ w (PPHMF͕։ൃͨ͠ݴޠ w ݄ʹॳϦϦʔε w 3PC1JLFɺ,FO5PNQTPOʢݩ6/*9 ։ൃऀʣΒ͕ॳظઃܭͨ͠੩తܕ͚ݴޠ w ͭ·Γ6/*9ͷΤοηϯε͕٧·͍ͬͯΔ
ͦͦʜ (PΦϒδΣΫτࢦݴޠ͔ʁ
(PΦϒδΣΫτࢦݴޠʁ https://golang.org/doc/faq
(PΦϒδΣΫτࢦݴޠʁ https://golang.org/doc/faq
l:FTBOEOP"MUIPVHI(PIBTUZQFTBOENFUIPETBOE BMMPXTBOPCKFDUPSJFOUFETUZMFPGQSPHSBNNJOH UIFSF JTOPUZQFIJFSBSDIZ5IFDPODFQUPGlJOUFSGBDFzJO(P QSPWJEFTBEJGGFSFOUBQQSPBDIUIBUXFCFMJFWFJTFBTZ UPVTFBOEJOTPNFXBZTNPSFHFOFSBM5IFSFBSFBMTP XBZTUPFNCFEUZQFTJOPUIFSUZQFTUPQSPWJEF TPNFUIJOHBOBMPHPVTCVUOPUJEFOUJDBMUP TVCDMBTTJOH.PSFPWFS NFUIPETJO(PBSFNPSF
HFOFSBMUIBOJO$ PS+BWBz *T(PBOPCKFDUPSJFOUFEMBOHVBHF
l:FTBOEOP"MUIPVHI(PIBTUZQFTBOENFUIPETBOE BMMPXTBOPCKFDUPSJFOUFETUZMFPGQSPHSBNNJOH UIFSF JTOPUZQFIJFSBSDIZ5IFDPODFQUPGlJOUFSGBDFzJO(P QSPWJEFTBEJGGFSFOUBQQSPBDIUIBUXFCFMJFWFJTFBTZ UPVTFBOEJOTPNFXBZTNPSFHFOFSBM5IFSFBSFBMTP XBZTUPFNCFEUZQFTJOPUIFSUZQFTUPQSPWJEF TPNFUIJOHBOBMPHPVTCVUOPUJEFOUJDBMUP TVCDMBTTJOH.PSFPWFS NFUIPETJO(PBSFNPSF
HFOFSBMUIBOJO$ PS+BWBz *T(PBOPCKFDUPSJFOUFEMBOHVBHF
w ಡΈࠐΈॲཧΛಁաతʹѻ͏ͨΊͷ3FBEFSʢඪ४ϥΠϒϥϦΑΓʣ w ࠪΛݡ͘ಁաతʹѻ͏ͨΊͷ7JTJUPSʢݴޠॲཧܥΑΓʣ ࠓճհ͢Δύλʔϯ
w ಡΈࠐΈॲཧΛಁաతʹѻ͏ͨΊͷ3FBEFSʢඪ४ϥΠϒϥϦΑΓʣ w ࠪΛݡ͘ಁաతʹѻ͏ͨΊͷ7JTJUPSʢݴޠॲཧܥΑΓʣ ࠓճհ͢Δύλʔϯ
JP3FBEFSΠϯλʔϑΣʔε
JP3FBEFSΠϯλʔϑΣʔε Ҿ Γ
ྫϑΝΠϧಡΈࠐΈͷྫ
3FBEFSΠϯλʔϑΣʔε ଞʹͨ͘͞Μ͋ΔΑʂ JOUFSGBDF JP3FBEFS 3FBE Q<>CZUF OJOU FSSFSSPS CVpP3FBEFS
3FBE Q<>CZUF OJOU FSSFSSPS PT'JMF 3FBE Q<>CZUF OJOU FSSFSSPS OFU*1$POO 3FBE Q<>CZUF OJOU FSSFSSPS
ϑΝΠϧ͔ΒಡΈࠐΈΛ࣮ݱ͢Δ3FBEFS 3FBEFSΠϯλʔϑΣʔε JOUFSGBDF JP3FBEFS 3FBE Q<>CZUF OJO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ͭ w ϑΟʔϧυʹೖ͞Ε͍ͯΔ۩Ϋ ϥεʹҰؔ༩͠ͳ͍ CVpPHP CVpP3FBEFS
ϑΝΠϧʹͯ͠ 3FBEFS͑͞ܧঝ͍ͯ͠Ε ԿͰࠩ͠ସ͑ΒΕΔ CVpP3FBEFS JOUFSGBDF JP3FBEFS JOUFSGBDF JP3FBEFS PT'JMF
ίωΫγϣϯʹͯ͠ 3FBEFS͑͞ܧঝ͍ͯ͠Ε ԿͰࠩ͠ସ͑ΒΕΔ CVpP3FBEFS JOUFSGBDF JP3FBEFS JOUFSGBDF JP3FBEFS OFU*1$POO
ࣗ࡞3FBEFSʹͯ͠ 3FBEFS͑͞ܧঝ͍ͯ͠Ε ԿͰࠩ͠ସ͑ΒΕΔ CVpP3FBEFS JOUFSGBDF JP3FBEFS JOUFSGBDF JP3FBEFS ࣗ࡞3FBEFS
"UPVSPG(P305
JP3FBEFSͷԿ͕خ͍͔͠ʁ w ݺͼग़͠ݩ͔Β͢ΕಡΈग़͠ݩͷιʔεΛҰҙࣝͤͣʹ͢Ή w JP3FBEFSʹ४ڌ͢Δͱಁաతʹ༷ʑͳػೳΛ֦ு͢Δ͜ͱ͕ग़དྷΔ w FH όοϑΝ͋Γ ϑΝΠϧιέοτΈ߹Θͤແݶେʂ ˞(P'ͷσβΠϯύλʔϯͰݴ͑$PNQPTJUF4UBSBUFHZύλʔϯʹ͍͔ۙ
w ಡΈࠐΈॲཧΛಁաతʹѻ͏ͨΊͷ3FBEFSʢඪ४ϥΠϒϥϦΑΓʣ w ࠪΛݡ͘ಁաతʹѻ͏ͨΊͷ7JTJUPSʢݴޠॲཧܥΑΓʣ ࠓճհ͢Δύλʔϯ
ίϯύΠϥͷಈ͖ ιʔείʔυ ࣈ۟ղੳ ߏจղੳ ҙຯղੳ ࠷దԽ ࣮ߦϑΝΠϧग़ྗ ˞࣮ࡍ͏গ͠ෳࡶͰ͢
ίϯύΠϥͷಈ͖ ̑ ιʔείʔυ ࣈ۟ղੳ ߏจղੳ ҙຯղੳ ࠷దԽ
࣮ߦϑΝΠϧग़ྗ <̑ >
ίϯύΠϥͷಈ͖ ιʔείʔυ ࣈ۟ղੳ ߏจղੳ ҙຯղੳ ࠷దԽ ࣮ߦϑΝΠϧग़ྗ <̑
> ˎ
ίϯύΠϥͷಈ͖ ιʔείʔυ ࣈ۟ղੳ ߏจղੳ ҙຯղੳ ࠷దԽ ࣮ߦϑΝΠϧग़ྗ
ˎ ׂѪ
ߏΛ८ճ͍ͨ͠ ˎ Λ͍͍ײ͡ʹ८ճͭͭ͠ɺͦͷϊʔυʹैͬͨॲཧΛ͍ͨ͠
ߏΛ८ճ͍ͨ͠ w 7JTJUPSΛ८ճ͢Δ w /PEF֤અΛදݱ͢Δ w &YQS/PEFΛ֦ுͨ͠Πϯ λʔϑΣʔε BTUXBMLHP BTUBTUHP
/PEFͷछྨͨͪ ˎ /PEF
/PEFͷछྨͨͪ ˎ &YQS
/PEFͷछྨͨͪ JOUFSGBDF /PEF JOUFSGBDF &YQS JOUFSGBDF %FDM #BTJD-JU FH Ϧςϥϧ
#JOBSZ&YQS FH ೋ߲ԋࢉࢠ *EFOU FH ม ʜ JOUFSGBDF 4UNU
/PEFͷछྨͨͪ ˎ #JOBSZ&YQS #BTJD-JU
#BTJD-JU
#JOBSZ&YQS
८ճ 8BML ͷಈ͖ ˎ 7JTJUPS
८ճ 8BML ͷಈ͖ ˎ 7JTJUPS
८ճ 8BML ͷಈ͖ ˎ 7JTJUPS
८ճ 8BML ͷಈ͖ ˎ 7JTJUPS 9 :
८ճ 8BML ͷಈ͖ ˎ 7JTJUPS 9 :
८ճ 8BML ͷಈ͖ ˎ 7JTJUPS
८ճ 8BML ͷಈ͖ ˎ 7JTJUPS 9 :
८ճ 8BML ͷಈ͖ ˎ 7JTJUPS
८ճ 8BML ͷಈ͖ ˎ 7JTJUPS 9 :
८ճ 8BML ͷಈ͖ ˎ 7JTJUPS
Կ͕خ͍͠ͷ͔ʁ w ८ճͱ๚࣌ͷϊʔυૢ࡞ͷͷ͕Ͱ͖Δ͜ͱ w ८ճͲͷछྨͷϊʔυ͔ʹؔ༩ͤͣಁաతͳΞΫηε͕Ͱ͖Δ w ֤ϊʔυ͝ͱʹઐ༻ͷॲཧΛॻ͘ͷͰίʔυͷݟ௨͕͠ྑ͍ w ϊʔυૢ࡞ʢ7JTJUʣΛϢʔβ͕֦ு͢Δ͜ͱ͕Ͱ͖Δ ˞(P'ͷσβΠϯύλʔϯͰݴ͑7JTJUPSύλʔϯʹ͍͕ۙɺશʹҰக͍ͯ͠ΔΘ͚Ͱͳ͍
ࠓճհͨ͠ύλʔϯ w ಡΈࠐΈॲཧΛಁաతʹѻ͏ͨΊͷ3FBEFSʢඪ४ϥΠϒϥϦΑΓʣ w ࠪΛݡ͘ಁաతʹѻ͏ͨΊͷ7JTJUPSʢݴޠॲཧܥΑΓʣ
Ͳ͕͜ΦϒδΣΫτࢦͩͬͨͷ͔ʁ
w ಡΈࠐΈॲཧΛಁաతʹѻ͏ͨΊͷ3FBEFSʢඪ४ϥΠϒϥϦΑΓʣ w ࠪΛݡ͘ಁաతʹѻ͏ͨΊͷ7JTJUPSʢݴޠॲཧܥΑΓʣ Ͳ͕͜ΦϒδΣΫτࢦͩͬͨͷ͔ʁ ݺͼग़͠ݩ͔Βৄࡉͷ࣮Λҙࣝ͠ͳ͍ ৄࡉͦͷੑ࣭͝ͱʹಈ࡞͢Δ
Ͳ͕͜ΦϒδΣΫτࢦͩͬͨͷ͔ʁ w ಡΈࠐΈॲཧΛಁաతʹѻ͏ͨΊͷ3FBEFSʢඪ४ϥΠϒϥϦΑΓʣ w ࠪΛݡ͘ಁաతʹѻ͏ͨΊͷ7JTJUPSʢݴޠॲཧܥΑΓʣ ΧϓηϧԽ ϙϦϞʔϑΟζϜ
࠷ޙʹ lจ໌ͷਐาɺਓ͕ҙࣝͤͣʹߦՄೳͳ ॏཁԋࢉͷత֦େʹΑΓͨΒ͞ΕΔz "MGSFE/PSUI8IJUFIFBEʢֶऀʣ
ຊࢿྉTQFBLFSEFDLʹͯެ։ࡁΈͰ͢ BETIPMPLP BETIPMPLP 5IBOLZPV