3 ms·
Worth a read, if you find go's syntax confusing: http://blog.golang.org/2010/07/gos-declaration-syntax.html http://blog.golang.org/2010/07/gos-declaration-synta
by shadowmint 15y ago
Worth a read, if you find go's syntax confusing:
http://blog.golang.org/2010/07/gos-declaration-syntax.html http://blog.golang.org/2010/07/gos-declaration-syntax.html
However, its true, I also don't like the :=, or []type syntax purely for aesthetic reasons, but I can see at least the reasoning for it.
As the article points out, the * syntax is oddly non-uniform which it kind of inherits from c. So it's a mixed bag.
Overall though, I find the syntax is less of a problem when you have a big block of go code and you can see it all working together.
It's when you get these little fragments that it looks a bit odd, compared with what you might be use to.