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
210
Other Decks in Programming
See All in Programming
Django for Data Science (Boston Python Meetup, March 2025)
wsvincent
0
240
PHPでお金を扱う時、終わりのない 謎の1円調査の旅にでなくて済む方法
nakka
3
1.3k
AI Agents with JavaScript
slobodan
0
140
Devinのメモリ活用の学びを自社サービスにどう組み込むか?
itarutomy
0
1.7k
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
0
990
CRE Meetup!ユーザー信頼性を支えるエンジニアリング実践例の発表資料です
tmnb
0
360
RCPと宣言型ポリシーについてのお話し
kokitamura
2
150
PHPによる"非"構造化プログラミング入門 -本当に熱いスパゲティコードを求めて- #phperkaigi
o0h
PRO
0
1.1k
パスキーのすべて / 20250324 iddance Lesson.5
kuralab
0
130
令和トラベルにおけるコンテンツ生成AIアプリケーション開発の実践
ippo012
1
270
GDG Super.init(version=6) - From Where to Wear : 모바일 개발자가 워치에서 발견한 인사이트
haeti2
0
560
WordPress Playground for Developers
iambherulal
0
120
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
328
21k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Designing for humans not robots
tammielis
251
25k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
51
2.4k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
GraphQLとの向き合い方2022年版
quramy
45
14k
Optimising Largest Contentful Paint
csswizardry
35
3.2k
Faster Mobile Websites
deanohume
306
31k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
We Have a Design System, Now What?
morganepeng
51
7.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Building Adaptive Systems
keathley
41
2.5k
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 JP3F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FBEFSΛϑΟʔϧυʹ࣋ͭ 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