Linked by Thom Holwerda on Wed 28th Mar 2012 19:22 UTC
General Development "Today marks a major milestone in the development of the Go programming language. We're announcing Go version 1, or Go 1 for short, which defines a language and a set of core libraries to provide a stable foundation for creating reliable products, projects, and publications. Go 1 is the first release of Go that is available in supported binary distributions. They are available for Linux, FreeBSD, Mac OS X and, we are thrilled to announce, Windows."
Thread beginning with comment 512225
To read all comments associated with this story, please click here.
Generics
by jello on Thu 29th Mar 2012 05:37 UTC
jello
Member since:
2006-08-08

Does Go now have generics?

Reply Score: 1

RE: Generics
by satsujinka on Thu 29th Mar 2012 05:57 in reply to "Generics"
satsujinka Member since:
2010-03-11

considering the authors of go are fundamentally opposed to including generic, I'm surprised you'd feel the need to ask that question.

though I do wish they'd include them, since there are generic functions and types in the specification. You just can't create one for yourself.

Reply Parent Score: 1

RE[2]: Generics
by voidlogic on Thu 29th Mar 2012 14:12 in reply to "RE: Generics"
voidlogic Member since:
2005-09-03

You can always use "interface{}", this is the "empty interface". All types implement this interface, so you can use it to write generic code.

Reply Parent Score: 3

RE[2]: Generics
by jello on Thu 29th Mar 2012 15:45 in reply to "RE: Generics"
jello Member since:
2006-08-08

> considering the authors of go are "fundamentally opposed" to including generic, I'm surprised you'd feel the need to ask that question.

What are you talking about?

Rob Pike said in one video I saw they are thinking how to implement it. And it could be that it will never show up in Go.

So "fundamentally opposed" seems to me your own opinion.

Reply Parent Score: 1