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
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
190
Other Decks in Programming
See All in Programming
Arm移行タイムアタック
qnighy
0
340
CSC509 Lecture 11
javiergs
PRO
0
180
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.7k
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.2k
RubyLSPのマルチバイト文字対応
notfounds
0
120
Micro Frontends Unmasked Opportunities, Challenges, Alternatives
manfredsteyer
PRO
0
110
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
距離関数を極める! / SESSIONS 2024
gam0022
0
290
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
110
EMになってからチームの成果を最大化するために取り組んだこと/ Maximize team performance as EM
nashiusagi
0
100
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
990
イベント駆動で成長して委員会
happymana
1
340
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Navigating Team Friction
lara
183
14k
Become a Pro
speakerdeck
PRO
25
5k
We Have a Design System, Now What?
morganepeng
50
7.2k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Why Our Code Smells
bkeepers
PRO
334
57k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Docker and Python
trallard
40
3.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
The Language of Interfaces
destraynor
154
24k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
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 OJOU FSSFSSPS CVpP3FBEFS
3FBE Q<>CZUF OJOU FSSFSSPS PT'JMF 3FBE Q<>CZUF OJ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VpPHP 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