News for hackers. Stuff that matters.
Re:Go 1.18 by candiddevmike on Tuesday March 15, 2022 @02:16PM (#30688883)
I think Go's criticisms come from elitism more than anything--folks can't flex their algebraic programming muscles and instead have to do error checking inline or do some WET things due to lack of generics like some amateur.

To me, Go is never the wrong choice, but it may not be the best choice for some projects.

Re:Go 1.18 by didibus on Tuesday March 15, 2022 @02:58PM (#30689496)
I don't think Go's criticism only comes from advanced type folks.

People criticize that handling errors is manual, annoying and error prone.

People criticize that you can't implement your own or new data-structures generically, nobody wants to use a non-generic data-structure, and Go's own data-structures are generic, so people complained that users couldn't do the same.

People criticize that the lack of higher level list comprehension or stream-like API for data manipulation is tedious. Implementing a filter as a for loop every time gets repetitive.

People criticize that duck typed interfaces can make it hard to track what implements what, and if it makes logical sense or not.

Etc.

Those are things Java and Python programmers are used too for example, so it's not like the criticism is just from Haskell folks.

Re:Go 1.18 by throwaway894345 on Tuesday March 15, 2022 @02:25PM (#30688978)
I'm a Go proponent, but I also feel this. Sometimes I want to be very abstract and clever. I've written a static site generator in Rust, not because a Go version would be too slow or error prone, but because I liked the idea of being gratuitously abstract and efficient. I feel clever and I like the aesthetic of very abstract programs. But this is almost always at-odds with the objectives of software development--very abstract/terse code is often much harder to understand than concrete/verbose code. There are significant material advantages to being able to onboard a developer with zero language experience to a project in a matter of hours rather than weeks or months.
Re:Go 1.18 by vlunkr on Tuesday March 15, 2022 @02:39PM (#30689195)
Agreed. I don't think the hate is that hard to understand. If you're coming from a more expressive language (which is most of them), it's a bit of a shock. I got over it and learned to love it, but I've seen others that don't, and I understand.
Re:Go 1.18 by quaunaut on Tuesday March 15, 2022 @02:23PM (#30688959)
I'm not sure it's elitism to be looking for type-system features that are well-over a decade old and generally non-controversial and considered vast positives.

I don't think they necessarily need to go crazy in this regard(as simplicity is one of Go's best strengths), but I don't think it's elitism.

Re:Go 1.18 by scns on Tuesday March 15, 2022 @07:08PM (#30693145)
> Algebraic data types were introduced in Hope, a small functional programming language developed in the 1970s at the University of Edinburgh. [0]

It predates Miranda and Haskell and is contemporaneous with ML, also developed at the University. [1]

ML had them too [2]

[0] https://en.wikipedia.org/wiki/Algebraic_data_type#Programmin...

[1] https://en.wikipedia.org/wiki/Hope_(programming_language)

[2] https://en.wikipedia.org/wiki/ML_(programming_language)

edit: add ML