ä»å¹Žãã¢ã©ã³ã»ãããŽã¡ã³ãšå ±åå·çããå€å žäœåãCããã°ã©ãã³ã°èšèªãã®èè ã§ãããã©ã€ã¢ã³ã»ã«ãŒãã¬ã³ã¯ããThe Go Programming Languageããšããæ¬ãæžããŸãããç¹ã«ãæ¬ã¯èšèªèªäœã®äœæè ã«ããå³å¯ãªå¶åŸ¡ã®äžã§äœæãããããã§ãã è±èªçã®æ¬ã®é»åçã¯ä»æ¥ã®ã¿å ¬éãããŸããããã€ãã®è²æž¡ã®çç±ã¯ãæ¬ã®åçã®äžæ£ç¢ºãã®ä¿®æ£ã§ããã 2016幎3æãŸã§ã«ãã·ã¢èªãžã®é«å質ã®ç¿»èš³ãæåŸ ãããŠããŸãã
èå³ã®ãããã¹ãŠã®èªè ã®æ³šç®ãéããŠãã¹ã©ãã·ã¥ãããã®æ¬ã®èè ãšã®æè¿ã®QïŒAã»ãã·ã§ã³ã翻蚳ããŠãã ããã
æ°é±éåãå šå¡ãå ±åäœæ¥ã§ãããThe Go Programming Languageããšããæ¬ã«ã€ããŠãã¢ã©ã³ã»ãããŽã¡ã³ãšãã©ã€ã¢ã³ã»ã«ãŒãã¬ã³ã«è³ªåããæ©äŒããããŸããã ã¹ã©ãã·ã¥ãããã¯ãæã人æ°ã®ããèªè ã®è³ªåãéžæãããããã«å¯ŸããåçãåãåããŸããã
Donovan / Kernighan ïŒé¢çœããŠæçºçãªè³ªåãããæéãå²ããŠãããªãã£ãçããã«æè¬ããŸãã æ®å¿µãªããããã¹ãŠã«çããããšã¯ã§ããŸããã§ããã ããã«ãç§ãã¡ã¯èª°ãGoèšèªéçºããŒã ã®ã¡ã³ããŒã§ã¯ãªããããåœåã¯ãå°æ¥ã®èšç»ã«é¢ãã質åããŠãŒãã£ãªãã£ã«ã€ããŠè©³ãã話ãããšã«å¯ŸããŠãããä¿¡é Œã§ããçããåºãããšãã§ããŸããã§ããã
OpenGLãšLockOSThread
OpenGLã®ãããªã©ã€ãã©ãªãæ£åžžã«åäœãããããã«é Œããªããã°ãªããªããå³ãããããã¯ã確èªãããšãã«ãGoã®äœ¿çšãåæ¢ããŸããã ãããä¿®æ£ããäºå®ã¯ãããŸããïŒ
Donovan ïŒåé¡ã®æ žå¿ã¯ãOpenGLã®ãããªå€ãã®Cã©ã€ãã©ãªãæé»çã«ã³ã³ããã¹ãæ å ±ãä¿åããããã«åŒã³åºãã¹ã¬ããã®èå¥åã䜿çšããããšã§ãã ããã¯ãã°ããŒãã«å€æ°ãã³ã³ããã¹ãæ å ±ã®ä¿åã«å®å šã«äœ¿çšã§ããå Žåããã«ãã¹ã¬ãããæšæºã«ãªãåã«APIã®èšèšãäœæãããããã§ãã ä»ã®å Žåããã®èšèšã®äœ¿çšã¯ãååŒã³åºããžã®è¿œå ãã©ã¡ãŒã¿ãŒã®è»¢éãç¯çŽã§ãããããå©äŸ¿æ§ã®åé¡ã«ãããŸããã
Goãèšèšãããšãã ã¹ã¬ããããŒã«ã«ã¹ãã¬ãŒãžïŒTLS ïŒã®ã¢ã€ãã¢ã¯ãã é¢ããå Žæã§ã®ã¢ã¯ã·ã§ã³ ããšåŒã°ãããã®ãé 眮ããåŸåãããããã«æåŠãããŸããã ïŒã¡ãªã¿ã«ãç§ãã¡ã¯ãã®ããšã«ã€ããŠæ¬ã§æžããŸããïŒã Goã«TLSãååšããªãããšã¯ãæ©èœããšèŠãªãããããããä¿®æ£ãããäºå®ã¯ãããŸããã ããããCã®GoäŸåTLSäŸåã©ã€ãã©ãªãGoã§ããè¯ãåäœãããæ©äŒããããŸããååã®David Crawshawãæè¿ããªã§éå¬ãããDotGo 2015ã§ãã®ããšã«ã€ããŠè©±ããŸããã
ããã±ãŒãžã®ããŒãžã§ã³ç®¡çãç¡èŠãããã®ã¯ãªãã§ããïŒ
ããŒãžã§ã³ç®¡çããã±ãŒãžãç¡èŠãããã®ã¯ãªãã§ããïŒ ããªãã¯ãŸã ããªãã®ãœãªã¥ãŒã·ã§ã³ã奜ãã§ããïŒ Goã䜿çšããã°ããã»ã©ããã®ç¬éã¯èšèªã®ã¢ãã¬ã¹è ±ãæãåºãããŸãã ãœãããŠã§ã¢ã¯æ°å幎åããååšãããã®éçºã¯ç¶ç¶çãªé²åã§ãã Goã®ã€ã³ããŒãã·ã¹ãã ã§ã¯ãããŒãžã§ã³ãŸãã¯ããã³ãããæå®ã§ããŸããããgo getãã³ãã³ãã§ãããã¯èš±å¯ãããŸããïŒãã ããäžè¬çãªããŒãžã§ã³ç®¡çã·ã¹ãã ã¯ãã¹ãŠãµããŒããããŸãïŒãgopkg.inãªã©ã®ããŸããŸãªããã¯ãçºæãããŸããã ãŸããä»ã®èšèªã®ããã±ãŒãžãããŒãžã£ãŒããã®åé¡ãå€ããå°ãªãããšã¬ã¬ã³ããªæ¹æ³ã§æ¢ã«è§£æ±ºããŠãããããåé¡ãäœã§ãããã¯æ確ã§ã¯ãããŸãã...
Donovan ïŒGoã¯å€§ããªããã°ã©ã ãäœæããããã«èšèšããããã®ã§ããããã®ã³ã³ããã¹ãã§ã¯ããŒãžã§ã³ç®¡çãé£ããããšã¯ããç¥ãããŠããŸãã
çŽ10幎åãGoogleã¯ã¢ã»ã³ããªã·ã¹ãã ã«ããŒãžã§ã³ç®¡çãå°å ¥ããå®éšãè¡ããŸããïŒRob Pikeãªã©ã«ãã£ãŠèšèšãããŸããïŒã ãã€ã€ã¢ã³ãã®äŸåé¢ä¿ã®åé¡ãåå ã§å€±æããŸãããããã¯ãå€ãã®äººãå€å žçãªããŒãžã§ã³çªå·ã®åé¡ã ãšèããŠãããšæããŸãã 4ã€ã®ããã±ãŒãžAãBãCãDããããAã¯BãšCã«äŸåããBãšCã¯äž¡æ¹ãšãDã«äŸåãããšããŸããããã¯diamondäŸåé¢ä¿ã§ãã èè Bãããã±ãŒãžDã®ããŒãžã§ã³1ã®ã¿ãé©åã§ãããèè Cãå°ãªããšãåãããã±ãŒãžDã®ããŒãžã§ã³2ãå¿ èŠãšããå Žåãäžå¯èœãªäžé£ã®å¶éãé©çšãããŸãã éããããã°ããå€ãããšãæ°ãããã®äž¡æ¹ã®ããŒãžã§ã³ã®Dã§Aãããã«ããã§ããŸãããå€ãã®å ŽåãåäœããŸããã ãã®å®éšã®åŸãGoogleã¯èªåããŒãžã§ã³ç®¡çã«äºåºŠãšæãå ããŸããã§ããã
çŸåšã®ããŒãžã§ã³ç®¡çã®æ¹æ³ã¯ã·ã³ãã«ã§ãããæåãã§ããããã±ãŒãžã®åããŒãžã§ã³ãç¬èªã®ååïŒãD1ãããD2ããªã©ïŒãæã€ç¬ç«ãããšã³ãã£ãã£ãšããŠååŸããçæ³çã«ã¯åããã±ãŒãžã®ããŒãžã§ã³æ°ãå¶éããŸã-ã«ã ãã®ãããGoogleã§ã¯ããŒãžã§ã³ç®¡çãåªå äºé ã§ã¯ãããŸããã
ãããããã®8æãå€äœã®Dave CheneyãGoã®ããã±ãŒãžã®ããŒãžã§ã³ç®¡çã¹ããŒã ãææ¡ããããããã®ã¢ã€ãã¢ãå°æ¥çºå±ããå¯èœæ§ããããŸãã
Goã§ã®ãšã©ãŒåŠç
Goã¯ãä»ã®èšèªã®ãšã©ãŒãåŠçããéåžžã«ç°ãªãæ¹æ³ã§ãã 倧èŠæš¡ã¢ããªã±ãŒã·ã§ã³ã®ã³ã³ããã¹ãã«ãããJavaãšæ¯èŒããããã®ã¢ãããŒãã®é·æãšçæã«ã€ããŠæããŠãã ããã
Kernighan ïŒå šäœãšããŠãGoã¯æ瀺çãªãšã©ãŒåŠçã匷ãæšå¥šããŸãã æšæºã©ã€ãã©ãªã®é¢æ°ã¯ã»ãšãã©ãã¹ãŠãé¢æ°ã®å€ãšãšãã«ãšã©ãŒã¹ããŒã¿ã¹ãè¿ããŸããã³ãŒãã¯ãã®ã¹ããŒã¿ã¹ã䜿çšããŠäœããã®åŠçãè¡ãå¿ èŠããããŸãã ãšã©ãŒãç¡èŠããããšã¯ã§ããŸããã ãã®ç¹ã§ãGoã¯Javaã«äŒŒãŠããããšã©ãŒããã£ãããŸãã¯ã¹ããŒããå¿ èŠããããŸãã ãã äœãããããšã¯ã§ããŸããã ã¯ããããã¯å°ããªã¯ã³ã¿ã€ã ããã°ã©ã ã®å Žåã¯äžäŸ¿ã§ããã倧ããªããã°ã©ã ã®å Žåã¯æ¬åœã®æãã§ãã ãããŠããããã®èšèªã¯ã©ã¡ãããæ£ããããšããè¡ããããããç¬èªã®æ¹æ³ã§è¡ããŸãã
ãããã®éãã¯ãäŸå€ã®äœ¿çšã§ãã Goã«ã¯äŸå€ã¡ã«ããºã ããªãããããã¹ãŠã®ãšã©ãŒã1ãæã§åŠçããçŽæ¥çãªæ¹æ³ã¯ãããŸãããJavaã®
try/catch
ã§ã¯å¯èœã§ããã
defer
ã¯ãšã©ãŒåŠçã®å Žæããä¿®æ£ãããã®ã«åœ¹ç«ã¡ãŸãã ããã¯ãã¹ãŠãJavaã³ãŒããããå°ãã³ã³ãã¯ãã«ããããšãã§ããããšãæå³ããŸãïŒããã«é¢ããŠã®ã¿ã§ãïŒïŒããããããããããäœãééã£ãŠãããã«ã€ããŠæ£ç¢ºãªæ å ±ãæäŸã§ããªããšããç ç²ãæã£ãŠããŸãã
Goã®æ¬ã§ã¯ããšã©ãŒåŠçã®ãããã¯ã«å€ãã®ã¹ããŒã¹ãå²ãåœãŠãããŠããŸãã ã»ãšãã©ã®äŸã§ã¯ããšã©ãŒãç¡èŠããã®ã§ã¯ãªããé©åã«ãšã©ãŒãåŠçããæ¹æ³ã瀺ããŸãããããã«ãããçµæã®äŸãå°ãé·ããªããŸããã
Donovan ïŒç§ã¯ããããã®Javaã³ãŒããæžããŸããããç§ã®çµéšã§ã¯ããè¯ãããšã©ãŒåŠçã¯äž¡æ¹ã®èšèªã§çããå°é£ã§ãã ãã ããGoã䜿çšãããšããšã©ãŒãæ°ããæ å ±ã§è£è¶³ãããã©ããã«é¢ä¿ãªããã»ãŒåãã³ãŒããèšè¿°ããå¿ èŠããããããã¹ããŒãããšãã«ãšã©ãŒã¡ãã»ãŒãžãè£è¶³ããæ§æäžã®ã³ã¹ããåæžãããŸãã å¯Ÿç §çã«ãJavaã¯
try/catch/throw
ãããã¯ãæžãããšãé¿ããã
try/catch/throw
æãã®ã§ãããã°ã©ãã¯ããŸãã«ãé »ç¹ã«ãšã©ãŒãã¹ããŒããŸãã èšèªã®äœ¿çšã«ãããå°ããªéãã«ã€ããŠã®ãã®ãããªå®éçãªç¥èããä»æ§ãèªãããšãã決ããŠåéã§ããªãããšã¯é¢çœãã§ãã
ãã£ããã¡ã³ããŽãŒ
Goã®äœ¿çšãæšå¥šããïŒãŸãã¯æšå¥šããªãïŒã·ããªãªãšãããžã§ã¯ãã¯ã©ãã§ããïŒ
Kernighan ïŒGoã¯éåžžã«åªããæ±çšèšèªã§ãããæ°ããã¿ã¹ã¯ã«Goã䜿çšããããšã«é害ã¯ãããŸããã ãããã¯ãŒãã³ã°ãä»ã®ç«¶åã¿ã¹ã¯ã䌎ãããã°ã©ã ã§æãããèŠãããããã§ãã ãŽã«ãŒãã³ã¯éåžžã«äŸ¿å©ã§å¹æçãªãã®ã§ããããã®èšèªã¯ãŸããã¡ã¢ãªãå ±æããããã®ããäŒçµ±çãªã¢ãããŒããããŸããµããŒãããŠããŸãã å®è·µã§ã¯ãGoã®ãããªãããã¯ãŒã¯ã§äœæ¥ããããã®æ°ããã³ãŒããæžã人ãããããšã瀺ãããŠããŸãã å人çã«ã¯ã以åã¯CãJavaããŸãã¯C ++ã«é Œã£ãŠããã¿ã¹ã¯ã®ãããã«ã䜿çšããŸãã
ãŸããGoã¯ã¹ã¯ãªããèšèªãšããŠã®èªèãç²åŸãã倧èŠæš¡ãªPythonã¹ã¯ãªããã®æœåšçãªä»£æ¿åã«ãªããŸããã ããã¯å°ãé©ããããããŸãããã¹ã¯ãªããèšèªã¯ãé«éã§åäœããå¿ èŠããããšãã«ãæ¥ãã§äœãããã°ãããæãããããã«éåžžã«äŸ¿å©ã ããã§ãã ãã¹ããŒã€ã³ãã³ãŒããåãšã©ãŒããéçã«åä»ããããèšèªã§ãã£ãšæ©ãæ€åºãããå¯èœæ§ã®ããä»ã®ãšã©ãŒã§èœã¡å§ãããšãåé¡ã¯åŸã§èµ·ãããŸãã Goã¯ã1è¡ã®è¡ãAwkã«çœ®ãæããŸããã10è¡ãŸãã¯100è¡ã®ããã°ã©ã ã®PythonãPerlããŸãã¯Rubyã眮ãæããŸããããã¿ã¹ã¯ãå°ã倧ãããããæ·±å»ã«ãªããšãåã®å®å šæ§ãšå¹çã®çµã¿åããã«ã¯ç¢ºãã«å°ãå€ãã®äœæ¥ãããããŸãã
Goã䜿çšããçç±
ã¬ããŒãžã³ã¬ã¯ã¿ãŒãè€æ°ãã£ã¹ããããCommon Lispãªã©ã®é«ã¬ãã«èšèªã§ã®æ¥µç«¯ãªæœè±¡åãããã³AdaãHaskellãªã©ã®äœã¬ãã«èšèªã§ã®ã»ãã¥ãªãã£ãã³ã³ãã€ã«æ®µéã§ã®ãšã©ãŒæ€åºãå¯èªæ§ãšé床ãæããç§ã®ãããªäººã«ãšã£ãŠãªã¹ããããŠãã2çš®é¡ã®èšèªãšæ¯èŒããŠãGoã䜿çšããå©ç¹ã¯äœã§ããïŒ Goã¯æ¬åœã«äœããããããŸããïŒ
Kernighan ïŒå®éãAdaãšç¹ã«Haskellã¯äœã¬ãã«èšèªãšããŸã䌌ãŠããŸããããŸããHaskellã¯éåžžåå¿è ã«ã¯æã®å±ããªããšããã«ãããŸãã ããããç³ãåãªããããã¯ãã¹ãŠã®ãããã³ã°ã§ãã Goã«ã¯ãåžæããå質ã®äž¡æ¹ã®ãªã¹ãã«èšèŒãããŠãããã¹ãŠã®ãã®ããããŸãïŒãã¡ãããç§ã®å£°æã®åŠ¥åœæ§ã¯æ¹å€ãããå¯èœæ§ããããŸã-ã 極端ãªæœè±¡å ãã®æå³ã«äŸåããŸãïŒãã䟿å©ã§å¹ççãªæ¹æ³ã§äžŠè¡æ§ãæäŸããŸãããã©ãŒã ; ããã€ãã®çš®é¡ã®ã¢ããªã±ãŒã·ã§ã³ã§ã¯ãããã¯æ·±å»ãªå©çããããããŸãã
Donovan ïŒGoã¯ãCommon LispãC ++ãJavaãPythonãªã©ã®èšèªã«æ¯ã¹ãŠéåžžã«ã·ã³ãã«ã«èŠããŸãã ãã¯ãããã³ãã¬ãŒããã¯ã©ã¹ããŒããŒïŒClassLoaderïŒãã¡ã¿ã¯ã©ã¹ã¯ãããŸããã ãããã®æ©èœ-ããã¯ãPLãªã¿ã¯ã®ããã«ãæ°ããèšèªã§æåã®ããã°ã©ã ã楜ããæžããšãã«æ¥ãã§éã³ãŸããã倧èŠæš¡ã«ç§»è¡ããå Žåã«ã®ã¿æå³ã¯ãããŸããã C ++ STLãLispã®éè¡çãã¯ãããŸãã¯Pythonã®__call__ã¡ãœããã®éå°ãªäœ¿çšã®ãããã°ã«è²»ãããããªãã®æ°æ¥éã®äžæå¿«ãªæ¥ã ãæãåºãããšãã§ããŸãã Goã®èšèšã§ã¯ãååé¡ã解決ããããã«ãæ°ã«å ¥ãã®ãæ¿ã£ããèšèªæ©èœãã°ã«ãŒãå ã§äœ¿çšããããšãããã倧ããªã³ãŒãããŒã¹ã®åçŽããåäžæ§ãèªèãããŒã å šäœã«ãšã£ãŠãã䟡å€ããããšèŠå®ããŠããŸãã
æœåšçãªè¡ã
Goã«ã¯ãçŸå®ã®äžçã§ã©ã®ãããªæ·±å»ãªå¯èœæ§ããããŸããïŒ ApacheãPHPãPythonãRubyãªã©ã®æ¢åã®ãªãŒãã³ãœãŒã¹Webã¹ã¿ãã¯ã眮ãæããäžã§ãGoã®å¯èœæ§ãã©ã®ããã«èŠãŠããŸããïŒ
Kernighan ïŒç¥ãå®å®ãåµé ããã®ã«6æ¥éããããããªãã£ãçç±ã¯ã圌ã以åã®éºç£ã«å¯ŸåŠããå¿ èŠããªãã£ãããã§ãã çŸå®çã«èšããšãã©ã®ããã°ã©ãã³ã°èšèªãã倧ããªã³ãŒãããŒã¹ãå®å šã«çœ®ãæããããšã¯ã§ããŸããã Goã¯ãå€ãã®å Žåãæ°ãããããžã§ã¯ããããšã«ããæ¢åã®ã·ã¹ãã ãæžãçŽãäºå®ã®å Žæã«é©ããŠããŸãã ããã«ãå€éšé¢æ°ã€ã³ã¿ãŒãã§ãŒã¹ãç¹ã«Cã©ã€ãã©ãªãä»ããŠæ¢åã®ã³ãŒãã«äŸ¿å©ãªã€ã³ã¿ãŒãã§ãŒã¹ãæäŸã§ããŸãããä»ã®äººã®ã³ãŒãããŒã¹å šäœã倧èŠæš¡ã«çœ®ãæããããšã¯èãã«ããã§ãã
ãããã³ ïŒGoãå¥ã®èšèªãã©ã€ãã©ãªãåãé€ãã®ãå©ããå¯èœæ§ã¯äœããšãã©ã€ã¢ã³ã«åæããŸãããããã¯æ±ºããŠåœŒã®ç®æšã§ã¯ãããŸããã§ããã ããããGoã¯é åçãªä»£æ¿æ段ã§ãã Goã®äººæ°ã®å€§éšåã¯ãæšæºã©ã€ãã©ãªã³ã³ããŒãã³ãããããããæ°åã®ããŒã«ã䜿çšããŠäŸ¿å©ãªWebãµãŒããŒããã®ä»ã®åæ£ã·ã¹ãã ãç°¡åã«äœæã§ããããšã«ãããŸãã æšæºã©ã€ãã©ãªã¯æè¿äœæãããããŸããŸãªã·ã¹ãã ãäœæããå°é家ãé¢äžããŠããŸããããã®ãããã¢ããªã±ãŒã·ã§ã³ã®éçºã®æåã®ã¹ãããã«ã¯Apacheãªã©ã®ãµãŒãããŒãã£ãµãŒããŒãRailsãªã©ã®ãã¬ãŒã ã¯ãŒã¯ã¯å¿ èŠãããŸãã-ãã¡ãããGoã«ãåæ§ã®ãã¬ãŒã ã¯ãŒã¯ãååšããŸããã
Goã®å ¬åŒIDEïŒ
Goçšã®å ¬åŒã®ã¯ãã¹ãã©ãããã©ãŒã IDEãéçºãããŠããŸããïŒ çµéšããã倧è¡ã®éã§ã®èšèªã®é©å¿ã¯ãGoogleãæäŸããAndroid Studio IDEãªã©ããã°ããç°¡åã«äœ¿çšãéå§ã§ããç¹å®ã®ããŒã«ã»ããã«ãã£ãŠå€§å¹ ã«å éã§ããããšã瀺ãããŠããŸãã Goã®äºå®ã¯ãããŸããïŒ
ãšããã§ãGUIã«ã€ããŠã¯ã©ãã§ãããããC++ããéããŠããã€ã³ã¿ãŒãã§ãŒã¹ãåããçç£çãªãã¹ã¯ãããã¢ããªã±ãŒã·ã§ã³ãéçºããæ©äŒãããããåŸãããã®ã¯ãã€ã§ããããã
Donovan ïŒè¯ãIDEã¯Goãè©ŠããŠã¿ããæ°ãã人ã ãåŒãä»ããã®ã«æå©ã«åãããšã«åæããŸãããç§ã®ååãšç§ã¯åŸã ã«VimãEmacsã®ãããªéåžžã«äŒçµ±çãªãšãã£ã¿ãŒã䜿çšããããšã«æ°ä»ããŸããã ãåŽé«ãªããã¹ãããããŠAcmeã§ãããã»ãšãã©ã®äººãIDEãšããŠèãããã®ã§ã¯ãããŸããã 泚ç®ãã¹ãã€ãã·ã¢ããã¯JetBrainsããã®ãã®ã§ãä»å¹Žã¯IntelliJ IDEAã§Goãã©ã°ã€ã³ãéçºããããŒã ãçµæããŸãããããã«ããã誰ã§ãGoã§æžãããããã°ã©ã ãä»ã®èšèªãšåããããç°¡åã«æ§ç¯ããã¹ãããããã°ããªãã¡ã¯ã¿ãªã³ã°ã§ããŸãã
GUIã®ã¯ãã¹ãã©ãããã©ãŒã ã©ã€ãã©ãªã«ã€ããŠã¯ã GXUIãShinyã®ãããªèå³æ·±ãå®éšãæ¢ã«è¡ãããŠããŸãããæšæºçãªãœãªã¥ãŒã·ã§ã³ã¯ãŸã ååšããŠããŸããã
Goã¯Javaã眮ãæããå¿ èŠããããŸããïŒ
Goã¯Androidã®éçºãã©ãããã©ãŒã /èšèªãšããŠJavaã眮ãæããå¿ èŠããããŸããïŒ
Donovan ïŒGoogleã®Goéçºè ã¯ãGoã䜿çšããŠAndroidããã³iOSçšã®ã¢ããªã±ãŒã·ã§ã³ãäœæã§ããããã«ç©æ¥µçã«åãçµãã§ããŸãã èå³ãããã°ãGopherCon 2015ã§Hana KimïŒGoogleïŒã®è¬æŒãã芧ãã ãã ã ãããä»ãããã¯åãªãå®éšã§ãããããBrownãåè¿°ããããã«ãGoã®ç®æšã¯æ¢åã®å€§èŠæš¡ãªã³ãŒãããŒã¹ã眮ãæããããšã§ã¯ãããŸããã
å®å šãªããã©ãŒãã³ã¹
Gnu + LinuxããŒã«ãã§ãŒã³ãGoã«æžãæãããšãCãäœå幎ãæäŸã§ããªãã£ãã»ãã¥ãªãã£ãæäŸã§ããŸãïŒBASHãšOpenSSLã®æè¿ã®ãã°ãæå³ããŸãïŒã ãã®ãããªåŽåã®ããããªéšåã§ãããAndroidã®ã»ãã¥ãªãã£ãè¿œå ããŸãã 1.5ã®ããã©ãŒãã³ã¹ãšã©ã€ãã©ãªã®ããŒãã¯ãå®è¡å¯èœãã¡ã€ã«ã®ãµã€ãºãå°ããããã®ã«åœ¹ç«ã¡ãŸãã LinuxããŒã¹ã®åæ§ç¯ã«é¢å¿ã®ããåãã¯ãããŸããïŒ
Donovan ïŒGoã¯ãèšèªã«ã©ã³ã¿ã€ã ã»ãã¥ãªãã£ãšç°¡åãªã·ã¹ãã ã³ãŒã«ã€ã³ã¿ãŒãã§ã€ã¹ãããããããŸãã³ãŒããè¿ éã«å®è¡ãããŠå¹ççã«åäœããéçãªå®è¡å¯èœãã¡ã€ã«ã«ã³ã³ãã€ã«ãããããããã®çš®ã®ãŠãŒãã£ãªãã£ã«é©ããŠããŸãã ãã ããããã§ã移æ€æ§ã«ã€ããŠå¿é ããå¿ èŠããããŸã.Goããã°ã©ã èªäœã¯ç°¡åã«ç§»æ€ã§ããŸãããGoã©ã³ã¿ã€ã ã¯å°æ°ã®éèŠãªã¿ãŒã²ãããã©ãããã©ãŒã çšã«ã®ã¿èšèšãããŠããããã®æ°ã¯gccããã³glibcã®ãµããŒããããã¯ããã«å°ãããªã£ãŠããŸãã
ç§ã¯ãã®ãããªãããžã§ã¯ããç¥ããŸããã
tEoPS
ããã°ã©ãã³ã°ã®æ¹æ³ãåŠã¶æ¹æ³ã«ã€ããŠã¯å€ãã®æ¬ãæžãããŠããŸãããããã°ã©ãã³ã°ã®æ¹æ³ã«ã€ããŠèªãã®ã¯ã»ãã®ãããã§ãã ãã©ã€ã¢ã³ãããªãã®æ¬ãããã°ã©ãã³ã°ã¹ã¿ã€ã«ã®èŠçŽ ãã¯æ¬åœã«å€å žçã§ãããç§ã®åŠçã¯äŸãèªãã®ã«èŠåŽããŠããŸãïŒFortran 66ãšPL / Iã«ã€ããŠã§ãïŒã ããããæŽæ°ããåžæã¯ãããŸããããŸãã¯ããããå¥ã®æ¬ããããŸããïŒ
Kernighan ïŒBill Plagerãšç§ãThe Programming of Programming Styleã§äœ¿çšããèšèªã¯ãé·ãé䜿çšãããŠããªãïŒPL / 1ïŒãã匷ãé²åããŠããïŒFortranïŒãããä»æ¥ã®æ¬ã®ã³ãŒãã¯ã»ãšãã©èªã¿ã«ããã§ãããã»ãšãã©ã®ã«ãŒã«ã¯åªããŠããŸãã¹ã¿ã€ã«ã¯ãŸã æå¹ã§ãã ãã«ãšç§ã¯äžåºŠã«Cã®æ¬ã®ããŒãžã§ã³ãæžããããç©äºã¯é ããŸã§è¡ããªãã£ãã åé¡ã®1ã€ã¯ãã«ãŒã«ã®äŸãèŠã€ããããšãé£ããããšã§ããã ãã1ã€ã®åé¡ã¯ãå®éã®ããã°ã©ã ã以åãããã¯ããã«å€§ããè€éã«ãªã£ãŠããããšã§ãããã®ããããã®ãããªæ¬ã§äœ¿çšã§ããã³ãŒããã©ã°ã¡ã³ããèŠã€ããŠéžæããããšã¯éåžžã«å°é£ã§ãã ãããã£ãŠããã®æ¬ãæŽæ°ãããããšã¯ã»ãšãã©ãããŸããã
ä»ã®æ¬ã«é¢ããŠã¯ãJosh BlochãšScott MeyersãããããJavaãšC ++ã§åªããã³ãŒããèšè¿°ããæ¹æ³ã«é¢ããåªããæ¬ãæžããŠããŸãã ãã£ãšåºãèšãã°ãç§ã¯åžžã«Steve McConnellã®Perfect Codeã奜ãã§ãæ¯å¹ŽFred Brooksã®Mythical Man-Monthãèªãã§åœŒãæ°é®®ãªç®ã§èŠãŸããã èªã䟡å€ã®ããæ¬ã®ãªã¹ãã¯ããã«éå®ãããŸããã ç¹å®ã®ç°å¢ãããã°ã©ãã³ã°èšèªã«é¢ããäœåãèªãã§ã¿ãŠãã ããã
ä»æ¥ã®äžçã®Cäœ
äŒèª¬ã«ãããšãCèšèªã¯ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®éçºçšã«äœæãããŸããã æéãçµã€ã«ã€ããŠãC ++ã¯ã倧èŠæš¡ããã©ãããã©ãŒã çšã®OSéçºããŒã«ãšããŠçœ®ãæããããå身ã®çµã¿èŸŒã¿ã·ã¹ãã ïŒæ倧8ãããããã»ããµã䜿çšãã256ãã€ãã®ã¡ã¢ãªãå¿ èŠãšãããã®ïŒãšã倧èŠæš¡ãã·ã¹ãã ã®ãã©ã€ããŒã®ã¿ãæ®ããŸããã Cã«ãšã£ãŠãä»æ¥ã®èšèšäžã®æ±ºå®CãšããŠåççãšæããããã®ã¯äœã§ããïŒãŸããçŸåšã®ã¿ã¹ã¯ã«åãããŠäœãå€æŽããã®ã§ãã
Kernighan ïŒèŠããŠãããŠãã ãã-èšèªCã¯Dennis Ritchieã®ä»äºã®ææã§ãã ç§ã¯åœŒãšäžç·ã«æ¬ãæžããã°ããã ãšæèšããŸãã ããã¹ã¯åªããäœå®¶ã§ãããããã°ã©ããŒã»ã©æªãã¯ãããŸããã§ããã
ããããã¹ãŠã«ãããCã¯çµã¿èŸŒã¿ã·ã¹ãã ãšãã©ã€ããŒã®ããã°ã©ãã³ã°ã§éåžžã«äººæ°ããããå¹çãéèŠã§ãããããŒããŠã§ã¢ã¬ãã«ãŸã§äžããããšãã§ããŸãã èšèªã®å©ç¹ã®1ã€ã¯æ¯èŒçå®å®ããŠããããšã§ãããããä»æ¥Cãå€æŽããè©Šã¿ã¯éçç£çãªãœãªã¥ãŒã·ã§ã³ã«ãªããšæããŸãã çå£ã«ã//ã䜿çšããã³ã¡ã³ãã®ãããªå°ããªæ©èœãé€ããŠãã»ãšãã©ã®ããã°ã©ããŒã¯1988 ISOæšæºã§æ瀺ããã圢åŒã§Cã䜿çšãããšããçãããããŸãïŒç¢ºèªããããšã¯ãããŸããïŒã C99ãšC11ã®æšæºã¯ãããã°ã©ãã®æ¥åžžæ¥åã§ããŸãå€åããŸããã
æ¬ãæžãåæ©ã
ç§ã¯èå³ããããŸã-ãªãGoã«ã€ããŠã®éåžžã«å€ãã®æ¬ãååšããã®ã«ããã1ã€å¿ èŠãªã®ã§ããïŒ ãGoããã°ã©ãã³ã°èšèªãã¯ãGo Programming BlueprintsãããGo in Actionããšã©ã®ããã«ç°ãªããŸãããå®éã«ã¯åãç®æ¬¡ãæã£ãŠããŸããïŒ å¥ã®æ¬ã®æå³ã¯äœã§ãã-å¥ã®ãCããã°ã©ãã³ã°èšèªããæã«å ¥ãããã®ã§ãããGolangã«ã€ããŠã§ããïŒ
Kernighan ïŒäŒéã®æž12:12ã§è¿°ã¹ãããã«ããããããã®æ¬ãäœãã®ã«çµããã¯ãããŸããããå¥ã®æ¬ã®å¿ èŠæ§ã«ã€ããŠã®ããªãã®è³ªåã¯éåžžã«å€ã話é¡ã§ãããšããªãã«ã»ã®ããããŸãã
誰ããæ¬ãæžããšãã圌ã¯åžžã«åœŒãåä»»è ããããããè¯ããæåããããšãä¿¡ããŠããŸãïŒãŸãã¯å°ãªããšãå¿ããæåŸ ããŠããŸãïŒ-ç§ã¯åŠå®çãªããšãæå³ããã®ã§ã¯ãªããæ°ããæ¬ã®çµç¹ããäŸã説æãããã³èšè¿°ã¹ã¿ã€ã«ã¯ãèªè ããã®æ¬ã圹ã«ç«ã€ãšæããããªãã®ã§ãã ããã¯ãã¢ã©ã³ãšç§ãGoããã°ã©ãã³ã°èšèªã§éæããããšããããšã§ãã Cã«é¢ããç§ã®æ¬ãšåããããæçšã§ããããšãå€æããå Žåãããã¯çŽ æŽãããããšã§ããããã®ãããªæåãç®æããŸããã
å²aboutã«é¢ããæ¢åã®æ¬ãããã€ãèŠãã ãã§ããïŒãããŠããããã¯ããªãããªã¹ãããæ¬ã§ã¯ãããŸããã§ããïŒããå®éã«ã¯ãã¢ã©ã³ãšç§ã¯æèçã«ããããèªãŸãªãããšã«æ±ºããŸãã-ç§ãã¡ãèªåã®æ¬ã«åãçµãããã«åº§ã£ãŠããã«èŠåºããèŠããããŸããã§ãããä»ã®èè ããç¡æèã«äœããåããããªãã£ãããã§ãã
Donovan ïŒç§ã«ãšã£ãŠã®åæ©ã¯ãGoãåŠã³å§ãããšãã«èªã¿ããæ¬ãæžãããšã§ãããããã¯ãèšèªãšãã®ã©ã€ãã©ãªã ãã§ãªããèšèªèšèšã®åçãæããã«ãããã®é«åºŠãªæ©èœãæ¢æ±ããå žåçãªãã©ãããããã³èšèªèªäœã®ã¹ã¿ã€ã«ãšçŸåŠãåæ ããŠããŸãã
KïŒRãšã®æ¯èŒã¯ããèªäœã瀺åããŠããŸã-åãããã圱é¿åã®ããå¥ã®æè¡æžã¯ç¥ããŸããã ããã¯ãã€ã³ã¿ãŒãããäžä»£ä»¥åã®æãéèŠãªèšèªã®æè²ã¬ã€ãã§ããã ãã§ãªãããã®èšèªãžã®åç §ã§ããããã®ä»æ§ã®äºå®äžã®ãã®ã§ããã ä»æ¥ããã¡ãããGo TourãGodocãããã³The Go Language SpecificationãæäŸãããŠããŸãããããã¯ãã¹ãŠãæºåž¯é»è©±ããçŽæ¥å©çšã§ããŸãã ã©ã€ãã©ãªã¯ãã倧ããããŠãŒãã£ãªãã£ã¯ããéèŠã§ãã èšèªã«é¢ããçŸä»£ã®æ¬ã¯å®å šã«ç°ãªããã®ã«çŠç¹ãåœãŠãŠããã¯ãã§ããããšãå€æããã®ã§ãç§ãã¡ã¯ããããã¹ãŠäžç·ã«åãŸãæ¹æ³ãè©ŠããŸããã