Rob Pike, on design of golang

By Xah Lee. Date: . Last updated: .
Rob Pike  on design of golang 2023-12-31
Rob Pike on design of golang 2023-12-31

Rob Pike, on design of golang

Rob Pike, creator of golang, gave reasons on design of golang

[on golang, less is exponentially more By Rob Pike. At ]

i agree with basically all his points. Golang is now my fav lang (not counting WolframLang)

the few am unsure are:

the few item i don't quite understand are:

here's his full list:

  1. regular syntax (don't need a symbol table to parse)
  2. garbage collection (only)
  3. no header files
  4. explicit dependencies
  5. no circular dependencies
  6. constants are just numbers
  7. int and int32 are distinct types
  8. letter case sets visibility
  9. methods for any type (no classes)
  10. no subtype inheritance (no subclasses)
  11. package-level initialization and well-defined order of initialization
  12. files compiled together in a package
  13. package-level globals presented in any order
  14. no arithmetic conversions (constants help)
  15. interfaces are implicit (no "implements" declaration)
  16. embedding (no promotion to superclass)
  17. methods are declared as functions (no special location)
  18. methods are just functions
  19. interfaces are just methods (no data)
  20. methods match by name only (not by type)
  21. no constructors or destructors
  22. postincrement and postdecrement are statements, not expressions
  23. no preincrement or predecrement
  24. assignment is not an expression
  25. evaluation order defined in assignment, function call (no "sequence point")
  26. no pointer arithmetic
  27. memory is always zeroed
  28. legal to take address of local variable
  29. no "this" in methods
  30. segmented stacks
  31. no const or other type annotations
  32. no templates
  33. no exceptions
  34. builtin string, slice, map
  35. array bounds checking

Programing Language Love and Hate