Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't understand, why did Go ignore the past ~30 years of PL insights?


Because 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.


Also 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.


My 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.


The 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.


Dart was never marketed (to my knowledge) as a general-purpose programming language. Go was marketed as the best thing since sliced bread, and especially as a "systems language", which it definitely isn't. It was also gaining popularity on HN at the same time Rust was gaining its initial wave of popularity (~2016-2017, around when I started reading HN), so the two were compared and written about a lot in a way that Dart never had the chance to since it never had a narrative foil.


In 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.


I 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.


Go 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.


You 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.


"Ignoring" is the charitable framing of this.

Sum types and product types are fundamental to a type system, the same way that addition and multiplication are fundamental to arithmetic.

You wouldn't design a language with only multiplication and not addition. You wouldn't design boolean operations with only `&&` and not `||`. You wouldn't design bitwise operations with only `&` and not `^`. You wouldn't design set operations with only `∩` and not `∪`.

The alternative to "ignore" here is "ignorant", so it seems a nicer intention that they were aware of the fundamentals and chose not to use them.


Thanks for your input! All the design proposal RFCs have shown they cause an issue with the Go Compatibility Promise whereby adding any enum value can cause a semver-MAJOR breaking change. This causes a greater rate of ecosystem churn which, in every design proposal so far, has been deemed a net negative outweighing the modelling benefits.


Yep, I'm aware. The question you asked was about the Go language designers ignoring the fundamentals, which is the root cause of this situation today where fundamentals can't be bolted on to the language later


Generics


Yes, 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?).


Yes, 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.


Because the designers of Go believed that most programmers at google are too stupid to understand and use them.


I 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?


The 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


Exactly my point! I don’t think anyone can reasonably look at that quote and think “He thinks the programmers are too stupid.”


> 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?


It's not about intelligence, it's about not having the experience to appreciate and make good use of "brilliant" language features.


I don’t see how anyone could miss the plain literal meaning so badly. He clearly doesn’t think very highly of his colleagues.


He 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.


Like I said, he clearly doesn’t think very highly of them. A fresh college graduate could learn how to use sum types in a day or two.


Sure they could. Sum types aren't in go, not because fresh grads can't learn how to use sum types, but because they couldn't see a clean way to add it to go and have it fit with the other stuff they were putting in go, which they thought was more important.

But trying to get new grads to use Haskell on the scale of a 10 million line code base, and have them not make a mess of it? That's the kind of thing he didn't trust the new grads with.


Just a clarification (that doesn't really change the point), he was in his early fifties when Go was first released


> 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.


I dont know how you can read that quote and come away with anything other than "He thinks the programmers are too stupid"


I guess you’re saying “not capable of understanding a brilliant language” = “stupid”? This equivalence seems obviously wrong to me.

Even if you believe that anyone not capable of writing Rust or Haskell is stupid, it doesn’t mean that Rob Pike thinks that these people are stupid.


I think Rob Pike didn't mean brilliant as a complete compliment here. It was more an indictment on astronaut engineering of languages rather then engineers. He is literally the designer of Go and likes to program in it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: