ãã®èšäºã¯ã以åã«å ¬éããã察æèšäºãžã®åçãšããŠæžãããŠããŸãã
éå»2幎以äžã«ããã£ãŠãGoã䜿çšããŠãéçºããã課éã·ã¹ãã ãåããç¹æ®ãªRADIUSãµãŒããŒãå®è£ ããŠããŸããã ãã®éçšã§ãèšèªèªäœã®åŸ®åŠããåŠã³ãŸãã ããã°ã©ã èªäœã¯éåžžã«åçŽã§ãããèšäºãæžãç®çã§ã¯ãããŸããããGoèªäœã䜿çšããçµéšã¯ããã®åŒè·ã«ãããŠããã€ãã®èšèãèšãã«å€ããŸãã Goã¯ãæ¬æ Œçã§ã¹ã±ãŒã©ãã«ãªã³ãŒãã§ãŸããŸã人æ°ã®ããèšèªã«ãªã£ãŠããŸãã ãã®èšèªã¯Googleã§äœæãããç©æ¥µçã«äœ¿çšãããŠããŸãã èŠçŽãããšãGoèšèªã®èšèšã¯ãã ããã°ã©ãã«ãšã£ãŠæªãããšã ãšå¿ããä¿¡ããŠããŸãã
匱ãããã°ã©ããŒåãã«èšèšãããŠããŸããïŒ
åé¡ã«ã€ããŠã®åŒ±ã話ã ã¢ã€ãã¢ãšå€¢ã«ã€ããŠã®åŒ·ã話...
Goã¯ç¿åŸãéåžžã«ç°¡åãªã®ã§ãæºåãã»ãšãã©ãŸãã¯ãŸã£ãããªããŠãã³ãŒããèªãããšãã§ããŸãã èšèªã®ãã®æ©èœã¯ãã³ãŒããäžæ žã§ã¯ãªãå°é家ïŒãããŒãžã£ãŒã顧客ãªã©ïŒãšäžç·ã«èªãŸãããšãã«ãå€ãã®äžçã®äŒæ¥ã§äœ¿çšãããŸãã ããã¯ãèšèšé§åéçºãªã©ã®æ¹æ³è«ã«éåžžã«äŸ¿å©ã§ãã
åå¿è ã®ããã°ã©ãã§ããã1ã2é±éåŸã«ããªããŸãšããªã³ãŒããçæãå§ããŸãã ç§ãå²studiedãç 究ããæ¬ã¯ããå²Languageèšèªã®ããã°ã©ãã³ã°ãïŒããŒã¯ã»ãµããŒãã£ãŒã«ãäœïŒãšåŒã°ããŠããŸãã ãã®æ¬ã¯éåžžã«åªããŠãããèšèªã®ãã¥ã¢ã³ã¹ã®å€ãã«è§ŠããŠããŸãã JavaãPHPãªã©ã®äžå¿ èŠã«è€éãªèšèªã®åŸãéæ³ã®æ¬ åŠã¯ããããã§ãã ããããé ããæ©ãããå€ãã®éãããããã°ã©ããŒã¯ãæ°ããåéã§å€ãæ¹æ³ã䜿çšããããšæãã§ããŸãã ããã¯æ¬åœã«å¿ èŠã§ããïŒ
Rob PikeïŒèšèªã®äž»ãªã€ããªãã®ãŒåŠè ïŒã¯ãGoãç解ããããã䜿ããããç£æ¥çšèšèªãšããŠäœæããŸããã ãã®èšèªã¯ã倧èŠæš¡ãªããŒã ã§æ倧éã®çç£æ§ãå®çŸããããã«èšèšãããŠãããçãã®äœå°ã¯ãããŸããã å€ãã®åå¿è ããã°ã©ããŒã¯ãæ¬ ããŠããå€ãã®æ©èœãããããšã«äžæºãèšã£ãŠããŸãã ãã®åçŽããžã®æ¬²æ±ã¯èšèªéçºè ã®æèçãªæ±ºå®ã§ããããããäœã®ããã§ããããå®å šã«ç解ããããã«ã¯ãéçºè ã®åæ©ãšGoã§éæããããšãç解ããå¿ èŠããããŸãã
ããã§ããªããããªã«ç°¡åã«ãªã£ãã®ã§ããïŒ ãããã€ã¯ããã®åŒçšã以äžã«ç€ºããŸãã
ããã§éèŠãªã®ã¯ãããã°ã©ããŒã¯ç 究è ã§ã¯ãªããšããããšã§ãã 圌ãã¯éåžžéåžžã«è¥ããæŸèª²åŸã«ç§ãã¡ã®ãšããã«æ¥ãŠãå€å圌ãã¯JavaãC / C ++ãPythonãå匷ããŸããã 圌ãã¯åªããèšèªãç解ããããšã¯ã§ããŸããããåæã«ãåªãããœãããŠã§ã¢ãäœæããŠã»ããã§ãã ã ãããããèšèªã¯ç解ãããããåŠç¿ãããããã®ã§ãªããã°ãªããŸããã
圌ã¯ãããŸãã«èšã£ãŠãCã«äŒŒãŠããã¯ãã§ãã Googleããã°ã©ããŒã¯ãã£ãªã¢ãæ©æã«éå§ããæç¶ãåèšèªãç¹ã«Cãã¡ããªãŒã«ç²ŸéããŠããŸãã æ°ããããã°ã©ãã³ã°èšèªã®è¿ éãªçç£æ§ã«å¯ŸããèŠæ±ã¯ããã®èšèªãéæ¿ãããã¹ãã§ã¯ãªãããšãæå³ããŸãã
è³¢ãèšèã§ããã
ã·ã³ãã«ãã®ã¢ãŒãã£ãã¡ã¯ã
ã·ã³ãã«ãã¯çŸãã人ã«ãšã£ãŠå¿ èŠãªæ¡ä»¶ã§ãã ã¬ãªã»ãã«ã¹ãã€ã
ã·ã³ãã«ã§ããããšã¯ããããããã¶ã€ã³ã«ãããŠæãéèŠãªé¡æã®1ã€ã§ãã ãåç¥ã®ããã«ãå®ç§ãªãããžã§ã¯ãã¯ãè¿œå ãããã®ããªããããžã§ã¯ãã§ã¯ãªããåé€ãããã®ããªããããžã§ã¯ãã§ãã å€ãã®äººã¯ãè€éãªã¿ã¹ã¯ã解決ããïŒãŸãã¯è¡šçŸããïŒã«ã¯ãè€éãªããŒã«ãå¿ èŠã ãšèããŠããŸãã ããããããã¯ããã§ã¯ãããŸããã ããšãã°ãPERLèšèªãåãäžããŸãã ãã®èšèªã®ã€ããªãã®ãŒåŠè ã¯ãããã°ã©ããŒã1ã€ã®åé¡ã解決ããããã«å°ãªããšã3ã€ã®ç°ãªãæ¹æ³ãæã€ã¹ãã ãšä¿¡ããŠããŸããã Goèšèªã®ã€ããªãã®ãŒå®¶ã¯å¥ã®éãæ©ã¿ãç®æšãéæããããã«ã¯1ã€ã®æ¹æ³ã§ååã§ãããæ¬åœã«è¯ããšå€æããŸããã ãã®ã¢ãããŒãã«ã¯çå£ãªåºç€ããããŸããå¯äžã®æ¹æ³ã¯åŠã³ããããå¿ãã«ãããã®ã§ãã
å€ãã®ç§»æ°ã¯ããã®èšèªã«ã¯ãšã¬ã¬ã³ããªæœè±¡åãå«ãŸããŠããªãããšã蚎ããŠããŸãã ã¯ããããããããã¯ãã®èšèªã®äž»ãªå©ç¹ã®1ã€ã§ãã èšèªã®æ§æã«ã¯æå°éã®éæ³ãå«ãŸããŠãããããããã°ã©ã ãèªãããã«æ·±ãç¥èã¯å¿ èŠãããŸããã ã³ãŒãã®åé·æ§ã«é¢ããŠã¯ãããã¯ãŸã£ããåé¡ã§ã¯ãããŸããã ããæžãããGolangããã°ã©ã ã¯ãã»ãšãã©ãŸãã¯ãŸã£ããæ§é åããã«åçŽã«èªã¿åãããŸãã ããã«ãããã°ã©ã ã®èªã¿åãé床ã¯ãæžã蟌ã¿ããå°ãªããšã1æ¡é«éã§ãã ãã¹ãŠã®ã³ãŒããåäžãªãã©ãŒãããïŒçµã¿èŸŒã¿ã®gofmtã³ãã³ãã䜿çšããŠå®è¡ãããïŒã§ãããšèããå Žåãããã€ãã®äœåãªè¡ãèªãããšã¯ãŸã£ããåé¡ã§ã¯ãããŸããã
ããŸãè¡šçŸåããªã
ã¢ãŒãã¯ãèªç±ãå¶çŽãããšãã¯èš±å®¹ããŸããã æ£ç¢ºãã¯åœŒã®è²¬ä»»ã§ã¯ãããŸããã
ã·ã³ãã«ããæ±ããŠãããããGoã«ã¯ãä»ã®èšèªã§ã¯æ £ããŠãã人ã«ãšã£ãŠã¯èªç¶ãªãã®ãšããŠèªèãããæ§é ããããŸããã æåã¯ããã¯å€å°äžäŸ¿ãããããŸããããããã°ã©ã ãäœåãç°¡åã«ãããæ確ã«èªãŸããããšã«æ°ä»ãã§ãããã
ããšãã°ãã³ãã³ãã©ã€ã³åŒæ°ããstdinãŸãã¯ãã¡ã€ã«ãèªã¿åãã³ã³ãœãŒã«ãŠãŒãã£ãªãã£ã¯æ¬¡ã®ããã«ãªããŸãã
package main import ( "bufio" "flag" "fmt" "log" "os" ) func main() { flag.Parse() scanner := newScanner(flag.Args()) var text string for scanner.Scan() { text += scanner.Text() } if err := scanner.Err(); err != nil { log.Fatal(err) } fmt.Println(text) } func newScanner(flags []string) *bufio.Scanner { if len(flags) == 0 { return bufio.NewScanner(os.Stdin) } file, err := os.Open(flags[0]) if err != nil { log.Fatal(err) } return bufio.NewScanner(file) }
Dèšèªã®åãåé¡ã®è§£æ±ºçã¯å°ãçãèŠããŸãããèªãã®ã¯ç°¡åã§ã¯ãããŸããã
import std.stdio, std.array, std.conv; void main(string[] args) { try { auto source = args.length > 1 ? File(args[1], "r") : stdin; auto text = source.byLine.join.to!(string); writeln(text); } catch (Exception ex) { writeln(ex.msg); } }
ã³ããŒå°ç
人ã¯èªåã®äžã«å°çãéã³ãŸãã ããŒãã£ã³ã»ã«ãŒãµãŒã
åå¿è ã¯ããžã§ããªãã¯å»è¬åãäžè¶³ããŠãããšããç¹ã§åžžã«Goã«äžæºãæã£ãŠããŸãã ãã®åé¡ã解決ããããã«ããããã®ã»ãšãã©ã¯çŽæ¥ã³ãŒãã³ããŒã䜿çšããŸãã ããšãã°ããã®ãããªäžå¹žãªå°é家ã¯ãæŽæ°ã®ãªã¹ããèŠçŽããæ©èœã¯ãåããŒã¿åã®åçŽãªã³ããŒã¢ã³ãããŒã¹ã以å€ã®æ¹æ³ã§ã¯å®è£ ã§ããªããšèããŠããŸãã
package main import "fmt" func int64Sum(list []int64) (uint64) { var result int64 = 0 for x := 0; x < len(list); x++ { result += list[x] } return uint64(result) } func int32Sum(list []int32) (uint64) { var result int32 = 0 for x := 0; x < len(list); x++ { result += list[x] } return uint64(result) } func main() { list32 := []int32{1, 2, 3, 4, 5} list64 := []int64{1, 2, 3, 4, 5} fmt.Println(int32Sum(list32)) fmt.Println(int64Sum(list64)) }
ãã®èšèªã«ã¯ããã®ãããªæ§æãå®è£ ããã®ã«ååãªæ段ããããŸãã ããšãã°ãäžè¬åãããããã°ã©ãã³ã°ã¯åé¡ãããŸããã
package main import "fmt" func Eval32(list []int32, fn func(a, b int32)int32) int32 { var res int32 for _, val := range list { res = fn(res, val) } return res } func int32Add(a, b int32) int32 { return a + b } func int32Sub(a, b int32) int32 { return a - b } func Eval64(list []int64, fn func(a, b int64)int64) int64 { var res int64 for _, val := range list { res = fn(res, val) } return res } func int64Add(a, b int64) int64 { return a + b } func int64Sub(a, b int64) int64 { return a - b } func main() { list32 := []int32{1, 2, 3, 4, 5} list64 := []int64{1, 2, 3, 4, 5} fmt.Println(Eval32(list32, int32Add)) fmt.Println(Eval64(list64, int64Add)) fmt.Println(Eval64(list64, int64Sub)) }
ãããŠãç§ãã¡ã®ã³ãŒãã¯åã®ã±ãŒã¹ãããããé·ãããšãå€æããŸããããäžè¬åãããŸããã ãããã£ãŠããã¹ãŠã®ç®è¡æŒç®ãå®è£ ããããšã¯é£ãããããŸããã
å€ãã®äººã¯ãDããã°ã©ã ã¯ããªãçãèŠããæ£ãããšèšãã§ãããã
import std.stdio; import std.algorithm; void main(string[] args) { [1, 2, 3, 4, 5].reduce!((a, b) => a + b).writeln; }
ãã ãããšã©ãŒåŠçã®åé¡ã¯Då®è£ ã§ã¯å®å šã«ç¡èŠããããããçãã ãã§ãããæ£ç¢ºã§ã¯ãããŸããã
å®éã«ã¯ãããžãã¯ã®è€éããå¢ããšãã®ã£ããã¯æ¥éã«çãŸããŸãã ããã«è¿ éã«ãæšæºã®èšèªæŒç®åã䜿çšããŠå®è¡ã§ããªãã¢ã¯ã·ã§ã³ãå®è¡ããå¿ èŠãããå Žåãã®ã£ããã¯çããªããŸãã
ç§ã®æèŠã§ã¯ããµããŒãæ§ãæ¡åŒµæ§ãèªã¿ãããã®ç¹ã§ã¯ãGoèšèªãåªå ãããŸãããåé·æ§ã¯å€±ãããŸãã
å Žåã«ãã£ãŠã¯äžè¬åãããããã°ã©ãã³ã°ã¯ãç§ãã¡ã«åŠå®ã§ããªãå©çããããããŸãã ããã¯ããœãŒãããã±ãŒãžãæ確ã«ç€ºããŠããŸãã ãããã£ãŠããªã¹ãã䞊ã¹æ¿ããã«ã¯ãsort.Interfaceã€ã³ã¿ãŒãã§ã€ã¹ãå®è£ ããã ãã§ååã§ãã
import "sort" type Names []string func (ns Names) Len() int { return len(ns) } func (ns Names) Less(i, j int) bool { return ns[i] < ns[j] } func (ns Names) Swap(i, j int) { ns[i], ns[j] = ns[j], ns[i] } func main() { names := Names{"London", "Berlin", "Rim"} sort.Sort(names) }
ãªãŒãã³ãœãŒã¹ãããžã§ã¯ããååŸããŠgrep "interface {}" -Rã³ãã³ããå®è¡ãããšãæ··ä¹±ããã€ã³ã¿ãŒãã§ã€ã¹ã䜿çšãããé »åºŠãããããŸãã æ°ã®çã仲éã¯ãããã¯ãã¹ãŠãžã§ããªãã¯è¬ã®äžè¶³ã«ãããã®ã§ãããšããã«èšãã§ãããã ãã ããããã¯åžžã«ããã§ã¯ãããŸããã DELPHIèšèªãäŸã«ãšã£ãŠã¿ãŸãããã ãããã®ãžã§ããªãã¯ãåãã§ããã«ãããããããä»»æã®ããŒã¿åã䜿çšããæäœã®ããã®ç¹å¥ãªåVARIANTãå«ãŸããŠããŸãã Goãåãããšãè¡ããŸãã
ã¹ãºã¡ã®éãã
ãããŠãææè¡£ã¯çæ°ã®å€§ããã«é©åããªããã°ãªããŸããã ã¹ã¿ãã¹ã©ãã»ã¬ããã
ãšã¯ã¹ããªãŒã ã¹ããŒãã®ãã¡ã³ã®å€ãã¯ãGoã«ã¯ãžã§ããªãã¯ãäœæããå¥ã®ã¡ã«ããºã ããªãã¬ã¯ã·ã§ã³ããããšèšãããšãã§ããŸãã ãããŠã圌ãã¯æ£ããã§ããã...ãããããŸããªã±ãŒã¹ã§ã®ã¿ã
ããã»ãã€ã¯ã¯ç§ãã¡ã«èŠåããŸãïŒ
ããã¯ã泚æããŠäœ¿çšããå¿ èŠããã匷åãªããŒã«ã§ãã å³å¯ã«å¿ èŠã«ãªããŸã§ã¯é¿ããŠãã ããã
ãŠã£ãããã£ã¢ã¯æ¬¡ã®ããšãæããŠãããŸãã
ãªãã¬ã¯ã·ã§ã³ãšã¯ãããã°ã©ã ãå®è¡æã«ç¬èªã®æ§é ãšåäœã远跡ããã³å€æŽã§ããããã»ã¹ãæå³ããŸãã ãªãã¬ã¯ã·ã§ã³ã®åºç€ãšãªãããã°ã©ãã³ã°ãã©ãã€ã ã¯ãååž°ããã°ã©ãã³ã°ãšåŒã°ããŸãã ããã¯ã¡ã¿ããã°ã©ãã³ã°ã®äžçš®ã§ãã
ãã ãããåãã®ãšããããã¹ãŠã®æéãæ¯æãå¿ èŠããããŸãã ãã®å Žåã次ã®ãšããã§ãã
- ããã°ã©ã äœæã®é£ãã
- ããã°ã©ã å®è¡é床
ãããã£ãŠãåå°ã¯å€§å£åŸã®æŠåšãšããŠæ³šæããŠäœ¿çšããå¿ èŠããããŸãã ãªãã¬ã¯ã·ã§ã³ã軜çã«äœ¿çšãããšãããã°ã©ã ãèªããªããªãããšã©ãŒã絶ãããäœéã«ãªããŸãã ãŸãã«ãã®ããšã¯ãã¹ãããããã°ã©ããŒãä»ã®ãããå®çšçã§æ§ãããªååã®åã§èªåã®ã³ãŒããèªç€ºã§ãããšããããšã§ãã
Cããã®æåçãªè·ç©ïŒ ããããå€ãã®èšèªããïŒ
åœå®¶ãšãšãã«ãçžç¶äººã«ã¯åéãæ®ã£ãŠããŸãã
èšèªã¯å®å šã«Cã®éºç£ã«åºã¥ããŠãããšå€ãã®äººãä¿¡ããŠãããšããäºå®ã«ãããããããããã¯ããã§ã¯ãããŸããã ãã®èšèªã«ã¯ãæé«ã®ããã°ã©ãã³ã°èšèªã®å€ãã®åŽé¢ãçµã¿èŸŒãŸããŠããŸãã
æ§æ
ãŸããææ³æ§é ã®æ§æã¯Cèšèªã®æ§æã«åºã¥ããŠããŸãã ãã ããDELPHIèšèªã倧ããªåœ±é¿ãåãŒããŸããã ãããã£ãŠãäœåãªè§ãã£ããå®å šã«åé€ãããããã°ã©ã ã®å¯èªæ§ãå€§å¹ ã«äœäžããããšãããããŸãã ãŸããèšèªã«ã¯operator :: =ãå«ãŸããŠããŸãããããã¯DELPHIèšèªã«åºæã§ãã ããã±ãŒãžã®æŠå¿µã¯ãADAãªã©ã®èšèªããåçšãããŠããŸãã æªäœ¿çšã®ãšã³ãã£ãã£ã®å®£èšã¯ãPROLOGèšèªããåçšãããŸãã
æå³è«
DELPHIèšèªã®ã»ãã³ãã£ã¯ã¹ã¯ãããã±ãŒãžã®åºç€ãšããŠæ¡çšãããŸããã åããã±ãŒãžã¯ããŒã¿ãšã³ãŒããã«ãã»ã«åãããã©ã€ããŒãããã³ãããªãã¯ãšã³ãã£ãã£ãå«ã¿ãŸãã ããã«ãããããã±ãŒãžã€ã³ã¿ãŒãã§ã€ã¹ãæå°éã«æããããšãã§ããŸãã
ããªã²ãŒãå®è£ æäœã¯DELPHIããåçšãããŸããã
ç·šé
ãžã§ãŒã¯ãããã®ãäžæè°ã§ã¯ãããŸãããCããã°ã©ã ã®ã³ã³ãã€ã«äžã«GoãéçºãããŸããã ãã®èšèªã®é·æã®1ã€ã¯ãè¶ é«éã³ã³ãã€ã«ã§ãã ãã®ã¢ã€ãã¢ã¯ãã«ãã£ããåãããã®ã§ãã ããã«ãåGoããã±ãŒãžã¯DELPHIã¢ãžã¥ãŒã«ã«å¯Ÿå¿ããŠããŸãã ãããã®ããã±ãŒãžã¯ãæ¬åœã«å¿ èŠãªå Žåã«ã®ã¿åã³ã³ãã€ã«ãããŸãã ãããã£ãŠã次ã®ç·šéåŸãããã°ã©ã å šäœãã³ã³ãã€ã«ããå¿ èŠã¯ãããŸããããå€æŽãããããã±ãŒãžããã³ãããã®å€æŽãããããã±ãŒãžã«äŸåããããã±ãŒãžã®ã¿ãåã³ã³ãã€ã«ããã ãã§ååã§ãïŒããã±ãŒãžã€ã³ã¿ãŒãã§ã€ã¹ãå€æŽãããå Žåã®ã¿ïŒã
é«ã¬ãã«ã®èšèš
ãã®èšèªã«ã¯ãCãªã©ã®äœã¬ãã«èšèªãšã¯ãŸã£ããé¢ä¿ã®ãªããããŸããŸãªé«ã¬ãã«ã³ã³ã¹ãã©ã¯ããå«ãŸããŠããŸãã
- è¡
- ããŒãã«ããã·ã¥
- ã¹ã©ã€ã¹æ°
- ã¢ãã«ã®ã¿ã€ãã³ã°ã¯ãRUBYãªã©ã®èšèªããåçšãããŠããŸãïŒæ®å¿µãªãããå€ãã®èšèªã¯ãã®èœåãååã«ç解ããŠãããã䜿çšããŠããŸããïŒã
ã¡ã¢ãªç®¡ç
éåžžãã¡ã¢ãªç®¡çã«ã¯å¥ã®èšäºãå¿ èŠã§ãã C ++ã®ãããªèšèªã§ã¯ãå¶åŸ¡ã¯éçºè ã«å®å šã«å§ããããDELPHIã®ãããªåŸã®èšèªã§ã¯ãåç §ã«ãŠã³ãã¢ãã«ã䜿çšãããŸããã ãã®ã¢ãããŒãã§ã¯ã倱ãããã¯ã©ã¹ã¿ãŒã圢æãããããã埪ç°ãªã³ã¯ã¯èš±å¯ãããããã®ãããªã¯ã©ã¹ã¿ãŒã®æ€åºïŒCïŒã®ããã«ïŒã¯Goã«çµã¿èŸŒãŸããŠããŸãã ããã«ãã¬ããŒãžã³ã¬ã¯ã¿ãŒã¯ãçŸåšç¥ãããŠããã»ãšãã©ã®å®è£ ãããå¹æçã§ãããå€ãã®ãªã¢ã«ã¿ã€ã ã¿ã¹ã¯ã§æ¢ã«äœ¿çšã§ããŸãã èšèªèªäœã¯ãå€æ°ãæ ŒçŽããããã®å€ãã¹ã¿ãã¯ã«å²ãåœãŠãããšãã§ããç¶æ³ãèªèããŸãã ããã«ãããã¡ã¢ãªãããŒãžã£ã®è² è·ã軜æžãããããã°ã©ã ã®é床ãåäžããŸãã
䞊è¡æ§ãšç«¶äº
èšèªã®äžŠåæ§ãšç«¶äºåã¯è³è³ãè¶ ããŠããŸãã äœã¬ãã«èšèªã¯ãGoèšèªãšãªã¢ãŒãã§ç«¶åããããšããã§ããŸããã å ¬å¹³ã«ã¯ããã®ã¢ãã«ã¯èšèªã®äœè ã«ãã£ãŠçºæãããã®ã§ã¯ãªããå€ãè¯ãADAèšèªããåã«åçšããããã®ã§ããããšã«æ³šæãã䟡å€ããããŸãã ãã®èšèªã¯ããã¹ãŠã®CPUã䜿çšããŠæ°çŸäžã®äžŠåæ¥ç¶ãåŠçã§ããŸããããããããã¯ã競åç¶æ ã䌎ããã«ãã¹ã¬ããã³ãŒãã®è€éãªåé¡ã§ã¯ããŸãäžè¬çã§ã¯ãããŸããã
è¿œå ã®å©ç¹
ãããæçã§ããã°ã誰ããç¡ç§ã«ãªããŸãã
ãã®èšèªã¯ãééããªãå€ãã®å©ç¹ãæäŸããŸãã
- ãããžã§ã¯ãããã«ãããåŸã®å¯äžã®å®è¡å¯èœãã¡ã€ã«ã¯ãã¢ããªã±ãŒã·ã§ã³ã®ãããã€ãå€§å¹ ã«ç°¡çŽ åããŸãã
- éçåä»ããšåæšè«ã«ããããã¹ããèšè¿°ããªããŠãã³ãŒãå ã®ãšã©ãŒã®æ°ãå€§å¹ ã«æžããããšãã§ããŸãã ãã¹ãããŸã£ããæžããã«ãåæã«ã³ãŒãã®å質ãå€§å¹ ã«äœäžããªãããã°ã©ããŒãç¥ã£ãŠããŸãã
- éåžžã«åçŽãªã¯ãã¹ã³ã³ãã€ã«ãšæšæºã©ã€ãã©ãªã®åªãã移æ€æ§ã«ãããã¯ãã¹ãã©ãããã©ãŒã ã¢ããªã±ãŒã·ã§ã³ã®éçºãå€§å¹ ã«ç°¡çŽ åãããŸãã
- RE2æ£èŠè¡šçŸã¯ã¹ã¬ããã»ãŒãã§ãããäºæž¬å¯èœãªã©ã³ã¿ã€ã ãåããŠããŸãã
- 匷åãªæšæºã©ã€ãã©ãªãã»ãšãã©ã®ãããžã§ã¯ãã§ãµãŒãããŒãã£ã®ãã¬ãŒã ã¯ãŒã¯ã䜿çšããã«å®è¡ã§ããŸãã
- ãã®èšèªã¯ãåé¡ã解決ããæ¹æ³ã§ã¯ãªããåé¡ã«éäžã§ããã»ã©åŒ·åã§ãããåæã«åé¡ãå¹ççã«è§£æ±ºã§ããã»ã©ååã«äœãèšèªã§ãã
- Goãšã³ã·ã¹ãã ã«ã¯ããã¹ããããã¥ã¡ã³ããããã±ãŒãžç®¡çã匷åãªãªã³ã¿ãŒãã³ãŒãçæã競åç¶æ æ€åºåšãªã©ãããããå Žé¢ã§ããã«äœ¿çšã§ããããŒã«ãæ¢ã«å«ãŸããŠããŸãã
- GoããŒãžã§ã³1.11ã«ã¯ãäžè¬çãªVCSââãã¹ãã®äžã«æ§ç¯ãããã»ãã³ãã£ãã¯äŸåé¢ä¿ç®¡çãçµã¿èŸŒãŸããŠããŸãã Goãšã³ã·ã¹ãã ãæ§æãããã¹ãŠã®ããŒã«ã¯ããããã®ãµãŒãã¹ã䜿çšããŠããããã®ãµãŒãã¹ããã³ãŒããããŠã³ããŒããã³ã³ãã€ã«ãããã³ã€ã³ã¹ããŒã«ããŸãã ããã¯çŽ æŽãããããšã§ãã ããŒãžã§ã³1.11ã®ç»å Žã«ãããããã±ãŒãžã®ããŒãžã§ã³ç®¡çã«é¢ããåé¡ãå®å šã«è§£æ±ºãããŸããã
- ãã®èšèªã®äž»ãªã¢ã€ãã¢ã¯éæ³ãæžããããšãªã®ã§ããã®èšèªã¯éçºè ããšã©ãŒåŠçãæ瀺çã«åŠçããããšã奚å±ããŠããŸãã ããã§ãªããã°ããšã©ãŒåŠçãå®å šã«å¿ããŠããŸãããã§ãã ãã1ã€ã¯ãã»ãšãã©ã®éçºè ããšã©ãŒåŠçãæèçã«ç¡èŠãã代ããã«ãšã©ãŒãåŠçããã®ã§ã¯ãªãåã«è»¢éããããšã奜ãããšã§ãã
- Goã®çŽç²ãªåœ¢åŒã«ã¯ä»®æ³æ§ããªãããããã®èšèªã¯å€å žçãªOOPæ¹æ³è«ãå®è£ ããŠããŸããã ãã ããã€ã³ã¿ãŒãã§ã€ã¹ã䜿çšããå Žåãããã¯åé¡ã§ã¯ãããŸããã OOPãååšããªãããšã«ãããåå¿è ã®åå ¥éå£ãå€§å¹ ã«æžå°ããŸãã
ã³ãã¥ããã£ã®ã¡ãªãããç°¡åã«
è€éã«ããããšã¯ç°¡åã§ãããåçŽåããããšã¯å°é£ã§ãã
Goã¯ã·ã³ãã«ã§æåããããã«èšèšãããŸããã ããŒã ã¯ãŒã¯ã®ãã¹ãŠã®é·æãç解ãããšã³ã¿ãŒãã©ã€ãºã¬ãã«ã®èšèªã®ç¡éã®å€åã«ããããããŠããè³¢ãããã°ã©ããŒã®ããã«æžãããŸããã æŠåšåº«ã«æ¯èŒçå°ããªæ§ææ§é ã®ã»ããããããããå®éã«ã¯æéã®çµéã«äŒŽãå€åã®åœ±é¿ãåããªããããéçºè ã¯èšèªé©æ°ã®ç¡éã®ç 究ã®ããã§ã¯ãªããéçºã®ããã«å€ãã®æéã解æŸããŸããã
äŒæ¥ã«ã¯å€ãã®å©ç¹ããããŸãããšã³ããªã®ãããå€ãäœããšå°é家ããã°ããèŠã€ããããšãã§ããèšèªã®äžå€æ§ã«ãã10幎åŸã«åãã³ãŒãã䜿çšã§ããŸãã
ãããã«
è³ã®ãµã€ãºã倧ããããã1é ã®ãŸãŠã¯ãŸã ããŒãã«è³ãåè³ããŠããŸããã
å人çãªãšãŽãããŒã ã®ç²Ÿç¥ãããåã£ãŠããããã°ã©ããŒããåŠåçãªä»äºãšç¡éã®ãèªå·±æ¹åããæããçè«å®¶ã«ãšã£ãŠãèšèªã¯æ¬åœã«æªãã®ã§ããååã®åã«ããå°é家ïŒIQä¿æ°ã§ã¯ãªãããããã®åºæºã§å¿ãæ£ç¢ºã«æž¬å®ããããšãæ¡ä»¶ãšããïŒã 人çã®ãã¹ãŠãšåæ§ã«ãããã¯å人çãªåªå äºé ã®åé¡ã§ãã ãã¹ãŠã®äŸ¡å€ããé©æ°ãšåæ§ã«ãèšèªã¯ãã§ã«æ®éçãªåŠå®ãã倧éã®èªèãžãšé·ãéã®ããæ©ãã§ããŸããã èšèªã¯ã·ã³ãã«ã§ç¬åµçã§ããããåç¥ã®ããã«ãç¬åµçãªãã®ã¯ãã¹ãŠã·ã³ãã«ã§ãïŒ
ãŸãšã
Goã«åãããããã¹ãŠã®å³ããæ¹å€ã®äžã§ã次ã®å£°æãéç«ã£ãŠããŸãã
- ãžã§ããªãã¯ãªãã æã人æ°ã®ããèšèªã®çµ±èšãèŠããšãäžäœ10èšèªã®ååã«ãžã§ããªãã¯ããªãããšãããããŸãã ã»ãšãã©ã®ãžã§ããªãã¯ã¯ã³ã³ããã§ã®ã¿å¿ èŠã§ãã ãããã£ãŠããããããã®å©çã¯å€§ããããŸããã
- Rustã®ãããªä»ã®èšèªã®æ¹ãã¯ããã«åªããŠããŸãïŒå°ãªããšãXXXãµã€ãã«ããŽãªïŒã ç¹°ãè¿ãã«ãªããŸãããæã人æ°ã®ããèšèªã®çµ±èšãèŠããšããªã¹ãã«RustããŸã£ããèŠã€ãããªãããè©äŸ¡ã®äžã«ãããŸãã å人çã«ã¯ãRustã奜ãã§ãããGoãéžæããŸããã
- XXXã«ã¯ãã®ãããªãã³ããããŸãã ããã¯ãã·ã³ãã«ãªã³ã€ã³ã®è£è¡šã§ãã ãããäžå©ãã©ããã¯ã誰ãã決ããããšã§ãã ãã ãããããžã§ã¯ãã®éçºè ã¯ãåçŽããåªå ããŠå¥œã¿ãäžããŸããã
- 圌ãã¯Go 2.0ããªãªãŒã¹ããäºå®ã§ãã ãã®ç«å Žã¯ãå®å家ã§ã¯ãªããªãã¶ãŒããŒã«ãã£ãŠåãããŸãã
- è¡šçŸåãååã§ã¯ãããŸããã äžéšã®åéã§ã¯è¡šçŸåãäžååã§ããããšã«åæããŸãããäžè¬çã«ã¯ã·ã³ãã«ã§äžè²«ããèšèªã§ãã ããã«ãèšèªã®è²§å°ã®ããã«ãéçºãããã¢ããªã±ãŒã·ã§ã³ã®ã¢ãŒããã¯ãã£ã«ããå€ãã®æ³šæãæããããããããã®æè»æ§ã«ãã©ã¹ã®åœ±é¿ãäžããŠããŸãã
å®éããã®èšäºã¯Goèšèªã®æ§æäžã®å©ç¹ã«ã€ããŠã§ã¯ãªããããŒã ã¯ãŒã¯ã®å©ç¹ãšéçºäžã®ãããžã§ã¯ãã®å¹æçãªé²åã«ã€ããŠã®ç°¡æœãªæŠèŠãšããŠèããŸããã ããå ·äœçãªåé¡ã«é¢é£ããŠããã®èšäºã¯ç¶ãããããšç解ãããŸããã ãã ãããããã¯ãžã®é¢å¿ããªããããããããç¶ç¶ã¯ãããŸããã
å®éš
ããªããèŠç¥ãã¬äººããèšèãä¿¡ããªãã§ãã ãããããããããªããšèŠç¥ãã¬äººã®äž¡æ¹ã®è¡çºãä¿¡ããŠãã ããã
æåŸã®éšåã¯ã建èšçå¿åã®æ¥œèŠ³äž»çŸ©è ã§ãããšèªåèªèº«ãèããèªåã®äºæã§ããã確èªã§ãã人ã ã®ã«ããŽãªãŒå°çšã§ãã æ®ãã®èŽè¡ã¯ããã®éšåãã¹ãããããŠãã ããã
ãã®å®éšã¯ããã¹ãŠã®å»ºèšçå¿åã®æ¥œèŠ³äž»çŸ©è
ãé·ãéïŒå°ãªããšãäºå®äžïŒããåœã®åºãããæ®ããããšãã°Stack Overflowã«èœã¡çãããšäž»åŒµããå人ã«è§ŠçºãããŸããã é·ãéä¿¡ããŠããªãã£ãã®ã§ããã®å®éšãè¡ãããšã«ããŸããã
ããã€ãã®èšäºãããã«æçš¿ãããŸãããããã¯ãç§ãåŒçšããã³ã¡ã³ãã®åæã®çµæã§ãã
- 確ãã«ãç§ã®å人ã®ä»®èª¬ã¯ç¢ºèªãããŸãããããã®å²åã¯æ¥éã«äœäžããŠããŸãããè¡å人ã®éã§ã¯ãŸã ååãªäººã ãèŠã€ãã£ãŠããŸãã ãŠãªã»ãã³ãã¯ããã®ãããªäººã ãã æãè ããšåŒã³ãå šåœãæ¯ããŠããŸãã 圌ã«ãããšããã®å²åã¯å°ããïŒçŽ2ïŒ ïŒã ç§ã¯ããã»ã©æ²èŠ³çã§ã¯ãªãããã£ãšãããããããšæããŸãã
- ã¡ãã£ã¢ã®æ³åã ç Žå£çãªæ å ±ã¯ã建èšçãªæ å ±ãããã¯ããã«èå³æ·±ããã®ã§ãã
- 矀è¡ã®å¿çåŠã ããã¯ã²ã©ãããšã§ãã圌女ãååãªäººã§ãã£ãŠãã圌女ã¯æ®é ·ãªéçŸãäœããŸãã 矀è¡ã®äžã®ç·ã¯ãã¯ãç·ã§ã¯ãããŸããã 客芳æ§ã«ã€ããŠè©±ãããšã¯ã§ããŸããã è«ççãªè°è«ãæš©åšããæ å ±æºãå äŸã¯åœŒã«åœ±é¿ãäžããŸããã
- 責任ãšå 責ã 人ã ã¯èªåèªèº«ãïŒå°ãªããšãèªåã®ç®ã«ã¯ïŒé«ããããã«ãä»ã®äººã«å±èŸ±ãäžããããšãåãã§ããŸãã ç¹ã«ãåçããå¿ èŠããªãå ŽåïŒç°¡åãªå ŽåããããŸã-ãã€ãã¹èšå·ãã¯ãªãã¯ãããšãã³ã¡ã³ããæžãå¿ èŠãããããŸããïŒã èšèãšè¡çºã®éã«ã¯ãæ°Žè·¯ãšäžæ°Žéã®éãšåããããå€ãã®å ±éç¹ããããŸãã
- èæ å¿ã ã»ãšãã©ã®ã¹ãããã¯ã©ããªåœ¢ã§ãç®ç«ã€æºåãã§ããŠããŸãã 圌ãã¯é埳çãªéå£ãæããŠããŸããã
- æ²èŠ³è« 欧米諞åœïŒç¹ã«ã¢ã¡ãªã«ïŒãšã¯ç°ãªããæ²èŠ³çãªææ ãåœå ã«åºãã£ãŠããŸãã ãåç¥ã®ããã«ã楜芳䞻矩è ã¯å°é£ã®äžã§æ©äŒãæ¢ããŠãããæ²èŠ³äž»çŸ©è ã¯æ©äŒã®äžã§å°é£ãæ¢ããŠããŸãã ããåœã§ã¯ãäœãã®è¯å®çãªæ§è³ªã«æ³šæãæã人ã¯ã»ãšãã©ããŸããã
- ãããã§ãã·ã§ããªãºã ãšäžç芳ã ã»ãšãã©ã®äººã¯ããŒã«ãèªåèªèº«ã®ç®çãšããŠéžæããç®çã®æ段ãšããŠã§ã¯ãããŸããã 人ã ã¯æ å ±ãæ±ãæ¹æ³ãå¿ããŠããŸãã 人ã ã¯æšã®åŸãã®æ£®ãèŠãŸããã æ å ±ã®é åããã圌ãã¯äž»èŠãªæèãæœåºããããšãã§ããŸããã 誰ããèªåèªèº«ã®æšæºã§ã¯ãªãå¥ã®èŠç¹ããèŠãããšã¯æããªãã æèŠã®çžéã¯æå¶ãããŸãã ããã§ã¯åãå ¥ããããŸããã
- 芪ãã¿ããããšæ¬æã 称è³ãããå奜ã°ã«ãŒãã¯èšèã§ã®ã¿ååšããŸãã ã¢ãžã£ã€ã«éçºã®äŸ¡å€ã¯çŽã®äžã«ãããŸãã
- åœåã ããã«ã€ããŠã¯äžè¬çã«å¥ã®èšäºãæžãããšãã§ããŸãã
- ååã æ£ãã質åããã人ãããŸããã ç§ã¯äžäœäœãããŠããã®ïŒ ãããããååããªããããç§ãã¡ã«ãšã£ãŠãç¬éçãªå©å·±çãªé¢å¿ãããã¹ãŠã®ååãçµã¿åããããã®ãããéèŠã§ããããšã誰ããç解ããŠããããã§ã¯ãããŸããã ç¶æ³ã«ãã¹ãŠã責ããäœãç§ãã¡ã«äŸåããŠããªããšèšãã®ãæãç°¡åã§ãã
ãã¹ãŠã®å»ºèšçå¿åã®æ¥œèŠ³äž»çŸ©è ã«æ·±ãæ¬æãšåæ ãæã£ãŠããŸãã
ã¢ããã©ãã¯ã¹