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

> creators were ignorant/lazy/negligent/drunk/lost a bet/etc.

This is not a well-intended comment, but then why didn't they add generics at the start? It's not like it was a surprise to anyone even remotely familiar with PLs that they will have to retrofit it sooner or later. Also, function-scoped defers instead of surrounding braces-based one? Come on...



Not adding generics, if you dig through the archives, was a pragmatic choice. Partly it was to help the process of language design, partly it was project management, and partly it was due to technical constraints. Generics is a big, complex feature. The team was prioritizing getting the most immediately valuable features shipped first, and didn’t want the introduction of generics to hit their limited resources too hard or distract from getting the fundamentals right. Generics implementations in existing languages at the time also made trade offs/interactions that weren’t appropriate for go.


That’s not how language design works. You can’t just postpone such an elementary feature with a TODO, it will interact with every other feature of the language, and if you haven’t left a place for the interactions you have to introduce breaking changes, which will shook the whole ecosystem.

There is zero point in postponing a feature so that you can build a community, which you will burn down later. It’s not a startup that has to be ready in X months or it will fail.


They were very clear about why generics weren't there for a long time -- they weren't sure how to do it and keep things simple and build quickly. I'm just a simple code monkey but I think they did a decent job with it.




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

Search: