4 ms·
I don't think they refuse features because of design aesthetics. Go has many warts already anyway.¹ The design goal for Go seems to be to make a language where
by gerbilly 7y ago
I don't think they refuse features because of design aesthetics. Go has many warts already anyway.¹
The design goal for Go seems to be to make a language where there is only one way to express a given algorithm.
They are trying to create a language where it is impossible to be clever.
This is not bad thing in itself, except when it starts to remove features that allow you to write clearer code.
For example I have a Java application that connects to a database. I _like_ that I can just let the transaction die for any uncaught exception that bubbles up from the DB layer.
I like that better than the idea of having to 'handle' a thousand possible errors from down there that I don't even understand. In some cases exceptions make for clearer code.
And don't even get me started about the lack of generics. That is a glaring omission that shows lack of understanding of the human factor in language design.
That they didn't anticipate this obvious feature makes me question the purity of the aesthetics.
This is all fine, and they are of course free to leave out whatever features they want: this is what makes it Google's language, after all.
1: Just one from today, inconsistent arithmetic with Durations.
- icholy 7y agoGo has very few warts. * nil interfaces. * duration arithmetic (easy to avoid once you understand it). * multiple ways of instantiating things (var vs new vs literals)