3 ms·
I guess I should explain why I think Go has low boilerplate. It does have "explicit everything" and I love that too. Also no "spooky action at a distance", like
by JulianMorrison 5y ago
I guess I should explain why I think Go has low boilerplate. It does have "explicit everything" and I love that too. Also no "spooky action at a distance", like redefined operators. Things do what they say and say what they mean.
What it doesn't have is a lot of noise basically intended to keep the compiler happy, or implement common indirection patterns. Types are generally simple and can often be omitted. It's not traditional OO, so a lot of needless abstraction can be skipped. Complying with interfaces just means providing the required methods. Go code compared with the equivalent C or Java is denser.
For what it's worth there was an attempt at improving errors, which would have added a keyword that means "do this, or if it fails return the error result in this function's error result". I liked that idea. I'm not sure why it wasn't well received, but they evidently have that on their to-do list.