Hacker News new | past | comments | ask | show | jobs | submit login

generics please?

    contains no language changes



My guess is you'll probably know a year in advance if that's actually going to happen.


It took Java 5 versions over 8 years to get generics. It's not going to happen in a minor release.


Yes, but Java was left behind and ate C#'s dust (and now Scala's) because of lack of progress like that.

Not the best example to justify adding generics late.


Stop using Java and C++ for comparing generics in Go. There are lots of languages that had generics on day one.


And all of them will stay in a niche because of their complexity (Scala, Haskell, D, ...).


Complexity? It's 2014 already.

Nothing complex about generics that the average modern day programmer can't grasp. We're not talking about some '00s enterprise drones that were never exposed to those concepts.

People used to talk like this about closures in Java too -- "too complex, who needs them", etc. Didn't turn out very well for the language's mindshare about the new generation of programmers...


> all of them will stay in a niche <

C# has had generics since 2.0, so ALL is a bad choice of words there.


Actually C# already had generics even before the 1.0 .NET release, but they weren't considered stable enough for a 1.0 release and priority was given to other parts of the .NET.

One of many posts about generics history in .NET:

http://blogs.msdn.com/b/dsyme/archive/2011/03/15/net-c-gener...


What's the casual definition of complexity? Stuff in here I don't like?

Honestly, in the medal positions for sloppily expressed programming sentiments, complex/simple occupy the bronze/silver positions just behind the ultimate... "elegant".


The complexity was not the issue, CLU, Ada, Eiffel, Sather, Modula-3, ML, and many others lacked the publicity stunt of having a godfather like Google.


And during all that time they were telling us we didn't need them.


I think it's safe to say that'll be 2.0, 3.0, or never -- not a point release.


If you need generics, Go is not the language you need.


In reality of people just don't know how to program without generics. Go provides interfaces which can be used to write generic code. Think of everything that has been written in C without generics or Java pre 1.4.

I'm all of the day generics is finely added (and yes I missed it a lot when I was new to Go a couple years ago), but it is much less of a issue then some people make it out to be.


I don't doubt that generics are very useful, but its a problem when every thread that mentions Go gets polluted by bitching from people who can't code without them.

I work with SQL mostly, and in find common table expressions very useful to simplify and (in some cases) enhance performance. When faced with a choice between MySQL and PostgreSQL, I could either 1) choose to gripe about the lack of CTEs in MySQL, or 2) use PostgreSQL.

Something about generics make so many people on HN choose the equivalent of (1).




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: