|
|
|
|
|
by seri
5390 days ago
|
|
I independently ended up with the same impression with the OP. Go feels just like a statically typed Lua. Not only does Go inherits Lua in some specific language features as pointed out by the OP, but it also learns from Lua's design philosophy: be minimal. When I was going through my journey with Go discovery, I noticed that the Go authors obsessively tried to keep the syntax size small. There is only one looping construct. The only polymorphism mechanism is interface, but interfaces are both very simple and flexible. This is like what Lua does with tables. This also means that when a feature introduces complexity into the language, the Go authors choose to discard it. There are advantages and disadvantages with exceptions, but I think what ultimately motivated the Go authors to leave exceptions behind is that it may complicate things. And Go also doesn't have any kind of compile-time generic, so one can't write functions like append() and copy() in pure Go. |
|