|
From the book: "But it has comparatively few features and is unlikely to add
more. For instance, it has no implicit numeric conversions, no constructors or destructors, no
operator overloading, no default parameter values, no inheritance, no generics, no exceptions,
no macros, no function annotations, and no thread-local storage." |
Hearing this leaves a bad taste in my mouth, because one of the (mis)features I've found in Go is its implicit default value in struct initialization. In Go, you don't get a compile error when you miss some fields while initializing a struct. e.g.
will happily set `t.a` to 0 and `t.b` to an empty string. While this is useful for maintaining backward compatibility (adding more fields to a struct doesn't break upstream code), it also hinders discovering genuine mistakes at compile time. So typical Go programs end up using 0 or an empty string as a sentinel value. This is probably what made me feel Go's dynamic nature the most. It really is pretty close to a dynamic language.