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

Totally serious. And, it's not just the lack of generics-- that's just the tip of the iceberg.


What problems have the lack of generics caused you in development?


Last time I used a language without generics I had to cast web form values (we used a library with a general-purpose representation of "form control backed by object"). Sometimes these were incorrect, and had to be debugged. More than that, when working on the form code I had to constantly keep track of the types of things in my head, because there was no way to have the computer do it for me (we did try Hungarian notation for a bit but that was a disaster). Is it the end of the world? No. Does it slow development? Absolutely.


"a language" means it presumably was not Go, and is therefore irrelevant. All languages are different.


The fact that we can talk about "generics" at all means you're wrong. Any general-purpose programming language has to solve the same set of problems and the ways different languages solve them are often recognizably the same approach. And Go is very, very similar to Java 1.4.


> Go is very, very similar to Java 1.4

Except for multiple return values, easy concurrency, implicit interfaces, real value types, pointers, functions as first class types, closures, no inheritance, no exceptions.... but yeah, other than that, they're totally similar languages.


In JavaScript, none at all.. ;-)

In C#, before generics, wiring up a typed collection/enumerable was seriously painful.


I think the right way to think about that is: "what solutions has lack of generics prevented me from writing?". From the expressive end of the power continuum, Go is way down there (somewhere below Blub probably).

http://www.paulgraham.com/avg.html


What solutions have lack of generics (in Go) prevented you from writing?


Type-safe json decoding.




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

Search: