| > I'm not sure how making the language more expressive and less prone to errors makes programs more difficult to maintain I never said nor contested that it did. I was questioning what the design philosophy or general appeal of the language was. If what you believe it is/should be differs from the maintainers themselves, then naturally you're going to likely have friction with how it solves problems or implements features in the first place, as you have divergent goals/philosophies. That doesn't make it a poorly designed language, it makes it the wrong tool (for you) for the job. To abstract the concept: Nails and Screws are both perfectly valid approaches to fastening things in general, but if you expect a hammer to turn screws effectively, you're gonna have a bad time because your approach/philosophies are misaligned, not because the Hammer is poorly designed. That also doesn't mean there isn't merit in the discussion of the pros and cons of nails and screws and when/how to use them, but that's fundamentally a separate (if adjacent, and still valid) discussion. EDIT: also, just want to clarify, I don't know Golang, so have no skin in the "is it better/worse/correct". I've long been a supporter of "the best tool for the job is the one you know", with perhaps the only exception to that being Brainfuck[0], unless your intended goal is just to fuck with people lol. 0: https://en.wikipedia.org/wiki/Brainfuck |
A few examples:
Multiple return vs. tuple: tuples can regarded as a single entity OR multiple entities
null pointer vs Option type: impossible to have null pointer exceptions
enums vs integers: no need to roll it yourself or have "stringer" code generator
multiple return errors vs result type: prevent accidental use of value when not valid
The list goes on. Go DID do some really nice things on balance: channels, go routines, etc. I think work quite well. I just think starting from a "C mindset" was the wrong foundation in which to build a language at this point in time.
Also, a good example of what you are talking about would be functional vs. imperative programming. THAT is very much in line with your argument, but that isn't what I'm talking about.