I would argue Go is a poorly designed language, though people are free to their opinions. Keeping things like null pointers when other languages got rid of them entirely (or used union type proofs to ensure they could not be referenced). The lack of tuples, pattern matching, enums, return ADT, etc. make it unwieldly to use in practice and verbose in nature. Sure, it is "simple", but that isn't the goal... the goal is to make it "easy" for the users to write correct programs.
The article also highlights explicit errors vs. exceptions. Sure, I would agree, but that isn't the only comparison. The best comparison would be via "return ADTs" ala Rust (and they could have been special cased for a return type as Go's designers did for special generic list/maps) which make it possible to disambiguate errors from valid return values without risk of error.
> the goal is to make it "easy" for the users to write correct programs.
I've only ever dabbled in Golang, but isn't the goal of Go ultimately to make it easy for devs to maintain programs with their hyperfocus on non-breaking changes and backwards compatibility (With previous versions)? It's less about being easy/nice to write the first time, but that you don't have to re-write it again and again with each version change, no?
I'm not saying the OP Article is correct, again, not familiar enough with the language to comment on that, but the whole reason I keep wanting to adopt it (just don't have the time) is everyone I know that uses it always sings its praises for the above features. Seems to be the defining point that drives it's adoption, at least among those I interface with.
I'm not sure how making the language more expressive and less prone to errors makes programs more difficult to maintain? I'm not suggesting they keep adding new features and I do think they got that right. Too many languages keep bloating their languages with new features. A small feature set is the right goal, but I just think they picked the wrong feature set. The features are too primitive and put the burden onto their users vs. the lang devs.
There is no inherent correct or not, just opinion. If Go meets your needs, go for it (pun not intended, but still comical lol). I honestly don't think the ideal language exists (and it will look a little different for everyone), but something between Rust and Go with a little bit of OOP would be a sweet spot I think.
> 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.
That isn't my argument. My argument is that the features chosen are worse on all accounts, and better on either none or almost none, therefore it is poorly designed language.
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.
It's a great language... That was quickly overshadowed by Rust.
Rust is significantly more difficult, but faster and has more hype.
I would love Go that has been optimized to beat Rust. It's actually a really easy language I wouldn't mind working in. Feels like someone made Python you can complie.v
I would argue Go is a poorly designed language, though people are free to their opinions. Keeping things like null pointers when other languages got rid of them entirely (or used union type proofs to ensure they could not be referenced). The lack of tuples, pattern matching, enums, return ADT, etc. make it unwieldly to use in practice and verbose in nature. Sure, it is "simple", but that isn't the goal... the goal is to make it "easy" for the users to write correct programs.
The article also highlights explicit errors vs. exceptions. Sure, I would agree, but that isn't the only comparison. The best comparison would be via "return ADTs" ala Rust (and they could have been special cased for a return type as Go's designers did for special generic list/maps) which make it possible to disambiguate errors from valid return values without risk of error.
> the goal is to make it "easy" for the users to write correct programs.
I've only ever dabbled in Golang, but isn't the goal of Go ultimately to make it easy for devs to maintain programs with their hyperfocus on non-breaking changes and backwards compatibility (With previous versions)? It's less about being easy/nice to write the first time, but that you don't have to re-write it again and again with each version change, no?
I'm not saying the OP Article is correct, again, not familiar enough with the language to comment on that, but the whole reason I keep wanting to adopt it (just don't have the time) is everyone I know that uses it always sings its praises for the above features. Seems to be the defining point that drives it's adoption, at least among those I interface with.
I'm not sure how making the language more expressive and less prone to errors makes programs more difficult to maintain? I'm not suggesting they keep adding new features and I do think they got that right. Too many languages keep bloating their languages with new features. A small feature set is the right goal, but I just think they picked the wrong feature set. The features are too primitive and put the burden onto their users vs. the lang devs.
There is no inherent correct or not, just opinion. If Go meets your needs, go for it (pun not intended, but still comical lol). I honestly don't think the ideal language exists (and it will look a little different for everyone), but something between Rust and Go with a little bit of OOP would be a sweet spot I think.
> 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
That isn't my argument. My argument is that the features chosen are worse on all accounts, and better on either none or almost none, therefore it is poorly designed language.
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.
It's a great language... That was quickly overshadowed by Rust.
Rust is significantly more difficult, but faster and has more hype.
I would love Go that has been optimized to beat Rust. It's actually a really easy language I wouldn't mind working in. Feels like someone made Python you can complie.v
Discussion (19 points, 1 day ago, 18 comments) https://news.ycombinator.com/item?id=42628303