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
200
Other Decks in Programming
See All in Programming
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
780
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
140
たのしいparse.y
ydah
3
120
Jakarta EE meets AI
ivargrimstad
0
260
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
480
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
480
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
220
Featured
See All Featured
Six Lessons from altMBA
skipperchong
27
3.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Building Applications with DynamoDB
mza
91
6.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Navigating Team Friction
lara
183
15k
What's in a price? How to price your products and services
michaelherold
243
12k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
We Have a Design System, Now What?
morganepeng
51
7.3k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Art, The Web, and Tiny UX
lynnandtonic
298
20k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
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<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͍ͯΔ۩Ϋ ϥεʹҰؔ༩͠ͳ͍ 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