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

The problem is not so much the absence of generics but the availability of crazy reflection at runtime compared to the rigid type system at compile time. There absolutely is a lack of balance here.

All these things were already pointed out 10 years ago and were met by "you don't need that with Go", "Go back writing Java" sort of contempt, which gave the Go community a bad reputation.

Go could have been fixed 10 years ago if Rob Pike and co listened. They didn't want to because they thought they knew better than everybody else. ADA already fixed the genericity problem while keeping things readable with a limited form of generics as incomplete types.



As I already mentioned a coupled of times, even CLU like generics would have been a good enough solution.

Something that they acknowledged not bothered to look at initially.

https://go.googlesource.com/proposal/+/master/design/go2draf...

> We would have been well-served to spend more time with CLU and C++ concepts earlier.




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

Search: