6 ms·
I think at some point Go is just going to have to either be a very flawed language, or make some very big breaking changes. Between union types being difficult
by cglan 2y ago
I think at some point Go is just going to have to either be a very flawed language, or make some very big breaking changes. Between union types being difficult to do properly, and sum types being subject to infinite arguments on GitHub. I get the feeling that it’s just going to stay a flawed language that I grow annoyed with.
Literally the only two features I’ve ever wanted in go is a way to express optional return values without pointers, and a way to be able to write a set of enumerable values in a sane way. The inability to express both in Go is quite frankly ridiculous.
I use go extensively. I’ve written numerous tools and deployed lots of things to production with it. Both of these problems are such a sore point for me. So many go libraries have either ridiculous workarounds with foot guns due to these two missing features that it hurts to use most of them.
- bobbylarrybobby 2y agoI don't understand, why did Go ignore the past ~30 years of PL insights?
- School-Cotton 2y agoBecause the designers of Go believed that most programmers at google are too stupid to understand and use them.
- klodolph 2y agoI see these kinds of hateful comments repeated on HN all the time, and these comments disgust me. Why phrase the criticism in such an incendiary way? What’s the goal here?
- kleton 2y agoThe exact quote > The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt
- klodolph 2y agoExactly my point! I don’t think anyone can reasonably look at that quote and think “He thinks the programmers are too stupid.”
- School-Cotton 2y ago> They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt How would you phrase this? Thinking programmers are too stupid to understand languages with modern features is just the plain literal meaning of the quote, no?
- packetlost 2y agoIt's not about intelligence, it's about not having the experience to appreciate and make good use of "brilliant" language features.
- db48x 2y agoI don’t see how anyone could miss the plain literal meaning so badly. He clearly doesn’t think very highly of his colleagues.
- onefiveone 2y ago> They’re typically, fairly young, fresh out of school these same lowly colleagues were also incapable of wiping their asses at one point in their life but over the years and skidmarks, they all mastered that beautiful language and now make heated bidet money.
- AnimalMuppet 2y agoHe spent decades at Bell Labs. He was also, IIRC, in his seventies. So a more charitable interpretation would be that most of his colleagues are in their 20s and just out of school with a CS degree. He doesn't think they can (productively) use the languages the cutting-edge PL researchers generate.
- deleted 2y ago[deleted]
- mappu 2y agoI don't understand, why did you think Go "ignored" them? I think a really important insight from ~50 years of PLs is that recent language features (say: lifetimes, or dependent types) do not always correlate with practical adoption, security guarantees, low cognitive overhead, teachability, readability, fast compilation, mechanical sympathy, and other such goals. You can totally argue that Go should have been designed differently, but it's much harsher and untrue to say the designers ignored the ideas you have in mind.
- VirusNewbie 2y agoGenerics
- rob74 2y agoYes, generics. Have all the people complaining about the lack of generics in Go adopted it now that it supports generics? No, they found other things to complain about. So this should probably be a lesson to stop looking for the "next big thing" to implement (non-nullability? Union types?).
- troupo 2y agoYes, people will complain about other things. Why is it surprising to you? Generics was a big thing because it impacted how a lot of code was written. It doesn't mean people don't want other things in the language that is hell bent on ignoring any practical advances in languages of the past 50 years. What you propose is to basically stop improving the language because people complain.
- troupo 2y agoYou can't have "low cognitive overhead" and Go's "let's pollute every single line of code with error handling". Same for "let's have multiple versions of the same type everywhere because we don't have generics" (thankfully, fixed). And so on.
- zaptheimpaler 2y agoGo the language is simple at the expense of code written in Go being complex. That’s why it sucks. Every problem it doesn’t solve or solves poorly to eschew complexity is a problem every Go codebase now has its own bespoke pattern or hack or library to solve. Its low cognitive overhead is false economy.
- treyd 2y agoBecause it wasn't designed by PL researchers. It was designed by systems programmers who are used to C and just wanted a "better C". It was made popular because that happened within Google and they publicly gave it their backing so they wouldn't have to train new hirees on their new language.
- josefx 2y agoAlso its creator pulled a Molyneux and basically promissed journalists everything they asked about it. Not only would it be the perfect C++ replacement for all projects at Google, it would do systems and embedded programming and dozens of other things as well.
- orwin 2y agoMy first Go project (i think this was ~2014), i created a supervisorD clone as a school project (the coroutine/channel part of the languages were pretty much perfect for that). After one week, i started calling Go: C+-. It felt like a superset of C with a lot of helpful tools, that kneecaped you each time you want to do something it's not meant to, like using memcpy. Why feel so much like C and not give you its most powerfull tool? (i was becoming pretty good with C memory management, pointer algorithms, and gcc at the time too, and not having those tools available to code/debug probably gave me a bad first impression). But it did its job pretty well in the end.
- School-Cotton 2y agoIn reality it turned out to be a worse C in many ways, because it has a GC and fat runtime (ruling it out for a huge chunk of what you might use C for) and lacks any kind of metaprogramming capability (yes, C macros are bad, but they're useful/necessary a lot of the time). Regardless of their intention, it turned out to be a competitor to Java, not C.
- hgs3 2y agoThe public backing by Google absolutely propelled Go into the spotlight, but Dart, also released by Google, hasn’t achieved anywhere near the same success. Considering how long ago Go was released, if the language didn't have its own merit, it would have fizzled out by now and failed to sustain its momentum or foster such a strong community.