Hacker News new | ask | show | jobs
by racingmars 1717 days ago
Given how successful Go has been without generics, it appears generics are not essential in a modern industry language.

I'm happy generics are coming to Go, but living without them hasn't been difficult. (Like the article author, I feel like I'm jumping through more ugly hoops due to lack of a proper enum type than I am due to lack of generics.)

2 comments

We went through all this with Java in 2004. Lots of people saying "we don't need generics", then a few years later nobody can imagine writing code without them. You may not yet know what you're missing, but you will.
The same can be said of C or JavaScript or any other language that is successful. Saying they have flaws doesn't somehow undo their success.

Programming languages are a human phenomenon, as is their success. They are popular in spite of their flaws, not because of them.

Flaws often represent design tradeoffs. Rust's lengthy compile times are a tradeoff for a highly sophisticated type system, where Go made the opposite choice (a simple type system for fast compiles). As a web engineer I prefer the latter for a rapid development/debug cycle.
Ocaml's compiler is very fast(not including extreme edge cases), It has nothing to do with "highly sophisticated type system". It's mostly llvm.

As a web engineer you should look at rescript/reason before making claims about compile times.