www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [OT] Go officially won't get generics

reply Paulo Pinto <pjmlp progtools.org> writes:
So the videos of the Gophercon 2014 are being made available.

Rob Pike did the keynote. At the expected question about generics,
his answer was "There are no plans for generics. I said we're going to 
leave the language; we're done.".

Discussion ongoing on HN,

https://news.ycombinator.com/item?id=7708904

--
Paulo
May 07 2014
next sibling parent reply "Jesse Phillips" <Jesse.K.Phillips+D gmail.com> writes:
On Wednesday, 7 May 2014 at 15:54:42 UTC, Paulo Pinto wrote:
 So the videos of the Gophercon 2014 are being made available.

 Rob Pike did the keynote. At the expected question about 
 generics,
 his answer was "There are no plans for generics. I said we're 
 going to leave the language; we're done.".

 Discussion ongoing on HN,

 https://news.ycombinator.com/item?id=7708904

 --
 Paulo
This statement doesn't sound like the "no generics" is the important part. It seems more like they have no plans to make Go 2.0, at least not with it bringing big breaking changes as people keep pointing out will happen. But that is probably reading too much into it, I can't imagine he wanted to put that much information in the statement. But then again I haven't seen any official word on Go 2.0 (similar to D3).
May 08 2014
parent reply "Jesse Phillips" <Jesse.K.Phillips+D gmail.com> writes:
On Thursday, 8 May 2014 at 18:29:45 UTC, Jesse Phillips wrote:
 This statement doesn't sound like the "no generics" is the 
 important part. It seems more like they have no plans to make 
 Go 2.0, at least not with it bringing big breaking changes as 
 people keep pointing out will happen.

 But that is probably reading too much into it, I can't imagine 
 he wanted to put that much information in the statement. But 
 then again I haven't seen any official word on Go 2.0 (similar 
 to D3).
Ah, well context around it removes all my claims. It is clear he is saying that Go 1.x will not have generics.
May 08 2014
parent reply Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Thu, 2014-05-08 at 19:37 +0000, Jesse Phillips via Digitalmars-d
wrote:
[…]
 Ah, well context around it removes all my claims. It is clear he 
 is saying that Go 1.x will not have generics.
Given the statements about backward compatibility there is no way Go 1.x can have generics. I'm fairly sure the core Go team are convinced the interface way and manual "overloading" is the way to go, and that generics are an unnecessary burden. Many people argue they are wrong without actually trying the style of programming inherent in the language. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
May 08 2014
parent "Paulo Pinto" <pjmlp progtools.org> writes:
On Friday, 9 May 2014 at 05:22:36 UTC, Russel Winder via 
Digitalmars-d wrote:
 On Thu, 2014-05-08 at 19:37 +0000, Jesse Phillips via 
 Digitalmars-d
 wrote:
 […]
 Ah, well context around it removes all my claims. It is clear 
 he is saying that Go 1.x will not have generics.
Given the statements about backward compatibility there is no way Go 1.x can have generics. I'm fairly sure the core Go team are convinced the interface way and manual "overloading" is the way to go, and that generics are an unnecessary burden. Many people argue they are wrong without actually trying the style of programming inherent in the language.
You mean programming in - Turbo Pascal with object as root - Oberon with object as root - Smalltalk with object as root - Modula-3 with ROOTANY as root - C++ without templates - Java with object as root Me, I know what it means. -- Paulo
May 08 2014
prev sibling next sibling parent reply "Bienlein" <jeti789 web.de> writes:
On Wednesday, 7 May 2014 at 15:54:42 UTC, Paulo Pinto wrote:
 So the videos of the Gophercon 2014 are being made available.

 Rob Pike did the keynote. At the expected question about 
 generics,
 his answer was "There are no plans for generics. I said we're 
 going to leave the language; we're done.".

 Discussion ongoing on HN,

 https://news.ycombinator.com/item?id=7708904

 --
 Paulo
I agree with Paulo. At 54:40 he says what Paulo has already quoted. And "we are done" means "that's it, folks". It even sounds to me like the language is finished and it will be left like that. -- Bienlein
May 08 2014
next sibling parent reply "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= writes:
On Thursday, 8 May 2014 at 21:09:38 UTC, Bienlein wrote:
 I agree with Paulo. At 54:40 he says what Paulo has already 
 quoted. And "we are done" means "that's it, folks". It even 
 sounds to me like the language is finished and it will be left 
 like that.
Well, he had previously stated that there would be no breaking changes, and that if there were changes it would have to be called "go version 2 or something". So when generics were brought up he stated that there were no plans for generics and "I said we are going to leave the language, we are done" (with version 1 semantics). Ola..
May 08 2014
parent reply "Bienlein" <jeti789 web.de> writes:
 Well, he had previously stated that there would be no breaking 
 changes, and that if there were changes it would have to be 
 called "go version 2 or something". So when generics were 
 brought up he stated that there were no plans for generics and 
 "I said we are going to leave the language, we are done" (with 
 version 1 semantics).

 Ola..
Robert Pike says in this thread (https://groups.google.com/forum/?hl=de#!topic/golang-nuts/3fOIZ1VLn1o): "Go has type switches, and therefore no need for the Visitor Pattern.". He has exactly the same mindset as Niklaus Wirth and Oberon never got templates. Future will tell... Would be a nice thing to bet a dime on whether Go will have generics or not. I bet not ;-).
May 09 2014
parent reply "Paulo Pinto" <pjmlp progtools.org> writes:
On Friday, 9 May 2014 at 07:05:59 UTC, Bienlein wrote:
 Well, he had previously stated that there would be no breaking 
 changes, and that if there were changes it would have to be 
 called "go version 2 or something". So when generics were 
 brought up he stated that there were no plans for generics and 
 "I said we are going to leave the language, we are done" (with 
 version 1 semantics).

 Ola..
Robert Pike says in this thread (https://groups.google.com/forum/?hl=de#!topic/golang-nuts/3fOIZ1VLn1o): "Go has type switches, and therefore no need for the Visitor Pattern.". He has exactly the same mindset as Niklaus Wirth and Oberon never got templates. Future will tell... Would be a nice thing to bet a dime on whether Go will have generics or not. I bet not ;-).
Oberon did eventually get some basic form of templates in Active Oberon, but that was not under Wirth's supervision. He actually went into the other direction by making a minimalist version of Oberon with Oberon-07. I had the opportunity to meet Wirth at CERN, when he and a few ETHZ members took part on the Oberon Day, back in 2004. He is really great guy, but he could not understand why Oberon was being ignored in the industry. As he expected the desire for quality would drive developers to it. In a similar vein to Rob Pike writing the blog post why he thinks C++ developers don't care for Go, Niklaus Wirth wrote a long article about the industry lack of interest in minimalist languages. The problem they fail to understand, or acknowledge, is that large scale architectures in simple languages usually lead to complex code with lots of boilerplate. -- Paulo
May 09 2014
next sibling parent reply "Chris" <wendlec tcd.ie> writes:
On Friday, 9 May 2014 at 07:38:46 UTC, Paulo Pinto wrote:
 On Friday, 9 May 2014 at 07:05:59 UTC, Bienlein wrote:
 Well, he had previously stated that there would be no 
 breaking changes, and that if there were changes it would 
 have to be called "go version 2 or something". So when 
 generics were brought up he stated that there were no plans 
 for generics and "I said we are going to leave the language, 
 we are done" (with version 1 semantics).

 Ola..
Robert Pike says in this thread (https://groups.google.com/forum/?hl=de#!topic/golang-nuts/3fOIZ1VLn1o): "Go has type switches, and therefore no need for the Visitor Pattern.". He has exactly the same mindset as Niklaus Wirth and Oberon never got templates. Future will tell... Would be a nice thing to bet a dime on whether Go will have generics or not. I bet not ;-).
Oberon did eventually get some basic form of templates in Active Oberon, but that was not under Wirth's supervision. He actually went into the other direction by making a minimalist version of Oberon with Oberon-07. I had the opportunity to meet Wirth at CERN, when he and a few ETHZ members took part on the Oberon Day, back in 2004. He is really great guy, but he could not understand why Oberon was being ignored in the industry. As he expected the desire for quality would drive developers to it. In a similar vein to Rob Pike writing the blog post why he thinks C++ developers don't care for Go, Niklaus Wirth wrote a long article about the industry lack of interest in minimalist languages. The problem they fail to understand, or acknowledge, is that large scale architectures in simple languages usually lead to complex code with lots of boilerplate. -- Paulo
With generics you mean templates, right? I started to use templates in D, although I wasn't convinced. But the more I use them the more I appreciate them. If you work with one or two basic types, templates don't seem to make much sense. But when you use the power of D, like having arrays of structs that hold arrays of structs etc., then templates start to make sense. The thing is, the language has to be designed in a way that templates make sense and can be used throughout the language. If not, better not to introduce them. D, at a certain point in time, started to be designed around templates, or with templates in mind. I think it was Andrei who convinced Walter to do that. But in my view the language has to cater for templates for them to be useful. Introducing them randomly for the sake of having them will not work.
May 09 2014
next sibling parent "Paulo Pinto" <pjmlp progtools.org> writes:
On Friday, 9 May 2014 at 11:46:20 UTC, Chris wrote:
 On Friday, 9 May 2014 at 07:38:46 UTC, Paulo Pinto wrote:
 On Friday, 9 May 2014 at 07:05:59 UTC, Bienlein wrote:
 Well, he had previously stated that there would be no 
 breaking changes, and that if there were changes it would 
 have to be called "go version 2 or something". So when 
 generics were brought up he stated that there were no plans 
 for generics and "I said we are going to leave the language, 
 we are done" (with version 1 semantics).

 Ola..
Robert Pike says in this thread (https://groups.google.com/forum/?hl=de#!topic/golang-nuts/3fOIZ1VLn1o): "Go has type switches, and therefore no need for the Visitor Pattern.". He has exactly the same mindset as Niklaus Wirth and Oberon never got templates. Future will tell... Would be a nice thing to bet a dime on whether Go will have generics or not. I bet not ;-).
Oberon did eventually get some basic form of templates in Active Oberon, but that was not under Wirth's supervision. He actually went into the other direction by making a minimalist version of Oberon with Oberon-07. I had the opportunity to meet Wirth at CERN, when he and a few ETHZ members took part on the Oberon Day, back in 2004. He is really great guy, but he could not understand why Oberon was being ignored in the industry. As he expected the desire for quality would drive developers to it. In a similar vein to Rob Pike writing the blog post why he thinks C++ developers don't care for Go, Niklaus Wirth wrote a long article about the industry lack of interest in minimalist languages. The problem they fail to understand, or acknowledge, is that large scale architectures in simple languages usually lead to complex code with lots of boilerplate. -- Paulo
With generics you mean templates, right? I started to use templates in D, although I wasn't convinced. But the more I use them the more I appreciate them. If you work with one or two basic types, templates don't seem to make much sense. But when you use the power of D, like having arrays of structs that hold arrays of structs etc., then templates start to make sense. The thing is, the language has to be designed in a way that templates make sense and can be used throughout the language. If not, better not to introduce them. D, at a certain point in time, started to be designed around templates, or with templates in mind. I think it was Andrei who convinced Walter to do that. But in my view the language has to cater for templates for them to be useful. Introducing them randomly for the sake of having them will not work.
Agreed. The issue being that to design a strong typed language in 2007 without support for genericity, does not make much sense. When all other mainstream languages have adopted them. Lets not forget that CLU (1975) and Ada (1980) were among the first ones to support it. The initial version of C++ STL was actually based on a preliminary version done in Ada. Even .NET was actually designed with generics support in mind (1999): http://blogs.msdn.com/b/dsyme/archive/2011/03/15/net-c-generics-history-some-photos-from-feb-1999.aspx -- Paulo
May 09 2014
prev sibling parent "Jesse Phillips" <Jesse.K.Phillips+D gmail.com> writes:
On Friday, 9 May 2014 at 11:46:20 UTC, Chris wrote:
 If not, better not to introduce them. D, at a certain point in 
 time, started to be designed around templates, or with 
 templates in mind. I think it was Andrei who convinced Walter 
 to do that.
It wasn't Andrei, but I don't remember who Walter gave credit to.
May 09 2014
prev sibling parent reply "Dicebot" <public dicebot.lv> writes:
On Friday, 9 May 2014 at 07:38:46 UTC, Paulo Pinto wrote:
 I had the opportunity to meet Wirth at CERN, when he and a few 
 ETHZ members took part on the Oberon Day, back in 2004.

 He is really great guy, but he could not understand why Oberon 
 was being ignored in the industry. As he expected the desire 
 for quality would drive developers to it.
From Wirth published books and known projects I have an impression that he is a brilliant scientist who has an extremely basic understanding of what engineers need. His languages are all about proposing academical solutions to practical problems.
May 09 2014
parent reply "Chris" <wendlec tcd.ie> writes:
On Friday, 9 May 2014 at 13:59:38 UTC, Dicebot wrote:
 On Friday, 9 May 2014 at 07:38:46 UTC, Paulo Pinto wrote:
 I had the opportunity to meet Wirth at CERN, when he and a few 
 ETHZ members took part on the Oberon Day, back in 2004.

 He is really great guy, but he could not understand why Oberon 
 was being ignored in the industry. As he expected the desire 
 for quality would drive developers to it.
From Wirth published books and known projects I have an impression that he is a brilliant scientist who has an extremely basic understanding of what engineers need. His languages are all about proposing academical solutions to practical problems.
There is this conflict between textbooks and real world (hardware / software interaction). Walter once said on this forum that when he sees textbook examples, he says that things don't really work that way. Through D, I've learned a lot about that, because the language was designed on hindsight and with the machine in mind.
May 09 2014
parent Walter Bright <newshound2 digitalmars.com> writes:
On 5/9/2014 7:18 AM, Chris wrote:
 There is this conflict between textbooks and real world (hardware / software
 interaction). Walter once said on this forum that when he sees textbook
 examples, he says that things don't really work that way.
Found that out when implementing textbook optimization algorithms. It's sort of like watching those miracle cleaning products on an infomercial, and then trying them out yourself :-)
May 09 2014
prev sibling parent reply Bruno Medeiros <bruno.do.medeiros+dng gmail.com> writes:
On 08/05/2014 22:09, Bienlein wrote:
 On Wednesday, 7 May 2014 at 15:54:42 UTC, Paulo Pinto wrote:
 So the videos of the Gophercon 2014 are being made available.

 Rob Pike did the keynote. At the expected question about generics,
 his answer was "There are no plans for generics. I said we're going to
 leave the language; we're done.".

 Discussion ongoing on HN,

 https://news.ycombinator.com/item?id=7708904

 --
 Paulo
I agree with Paulo. At 54:40 he says what Paulo has already quoted. And "we are done" means "that's it, folks". It even sounds to me like the language is finished and it will be left like that. -- Bienlein
I find this aspect much more interesting than the "get generics or not" one. So Rob Pike and the other guy is leaving the language then? I wonder what that means for the future of Go. I guess the community will take over, but will there be someone from Google still in charge? And how many resources/manpower from Google will they still dedicate to Go? The thing about generics is that, if Go where to break through and become a mainstream popular language, generics would likely be added to it somehow. Maybe in the main language, as in Go 2.0, or maybe as side-project/language-extension (Go++ ?) that someone else would take. Similar to Java which tried to keep the language as simple as possible in the beginning (no operator overload, no metaprogramming or generics, etc), but eventually saw the shortcoming as too significant.. (even if the only thing they added was type-parameterization generics, but even just that makes a big difference) -- Bruno Medeiros https://twitter.com/brunodomedeiros
May 09 2014
parent reply "Jesse Phillips" <Jesse.K.Phillips+D gmail.com> writes:
On Friday, 9 May 2014 at 11:38:13 UTC, Bruno Medeiros wrote:
 I find this aspect much more interesting than the "get generics 
 or not" one. So Rob Pike and the other guy is leaving the 
 language then?
No, the context around what he said is very important. Google isn't leaving Go development, generics are not nixed for Go 2.0, the language will continue to see bug fixes. This is all very clear with context. I don't expect the will look to add generics in Go 2.0 (others will, but not them).
May 09 2014
parent reply "brad clawsie" <brad b7j0c.org> writes:
On Friday, 9 May 2014 at 19:07:24 UTC, Jesse Phillips wrote:

 No, the context around what he said is very important. Google 
 isn't leaving Go development, generics are not nixed for Go 
 2.0, the language will continue to see bug fixes. This is all 
 very clear with context.
I see this as a good. What would you rather use - a third party library written against abstractions or one written against concrete types? I would rather use a library based on concrete types. My observation is that the more abstraction people indulge, the greater the chance I will regard one of their abstractions as a code smell. And it isn't the the case that the lack of generics is inhibiting participation. Go's library selection is already very good and getting better daily. Just yesterday I needed a Go lz4 compression library and was able to find three distinct implementations. Go is not hurting for third-party libraries.
May 09 2014
parent "Dicebot" <public dicebot.lv> writes:
On Friday, 9 May 2014 at 21:03:06 UTC, brad clawsie wrote:
 On Friday, 9 May 2014 at 19:07:24 UTC, Jesse Phillips wrote:

 No, the context around what he said is very important. Google 
 isn't leaving Go development, generics are not nixed for Go 
 2.0, the language will continue to see bug fixes. This is all 
 very clear with context.
I see this as a good. What would you rather use - a third party library written against abstractions or one written against concrete types? I would rather use a library based on concrete types. My observation is that the more abstraction people indulge, the greater the chance I will regard one of their abstractions as a code smell.
Quite likely you won't be able to use that 3d party library with your types at all and will need runtime conversion between library types and your own. std.algorithm is prime example of how generalization improves code reuse.
 And it isn't the the case that the lack of generics is 
 inhibiting participation. Go's library selection is already 
 very good and getting better daily. Just yesterday I needed a 
 Go lz4 compression library and was able to find three distinct 
 implementations. Go is not hurting for third-party libraries.
This has nothing to do with the language. Existing mainstream languages are so bad that people will contribute to anything that is backed by solid brand and has enough fuss about. I clearly remember seeing several articles about crazy library design that is forced by Go lack of generics of any sort.
May 09 2014
prev sibling next sibling parent reply "brad clawsie" <brad b7j0c.org> writes:
Beyond being fodder for people who don't write Go but hate it for 
some reason, this seems to be an ongoing non-event. The official 
mailing list has practically no mention of generics anymore.
May 09 2014
parent Nick Treleaven <ntrel-public yahoo.co.uk> writes:
On 09/05/2014 18:25, brad clawsie wrote:
 The official mailing list has practically no mention of generics anymore.
I think it comes up fairly regularly, despite the ML regulars being very anti-generics. This was posted just 2 months ago: https://groups.google.com/forum/#!topic/golang-nuts/PI_nf78jV2k
May 10 2014
prev sibling parent "Bienlein" <jeti789 web.de> writes:
On Wednesday, 7 May 2014 at 15:54:42 UTC, Paulo Pinto wrote:
 So the videos of the Gophercon 2014 are being made available.

 Rob Pike did the keynote. At the expected question about 
 generics,
 his answer was "There are no plans for generics. I said we're 
 going to leave the language; we're done.".

 Discussion ongoing on HN,

 https://news.ycombinator.com/item?id=7708904

 --
 Paulo
When Rob Pike was asked at the end of his keynote speech whether Go will support generics one day the majority of the audience was immediately laughing. If I were into Go this would make me think. I don't think parameterized types are necessary for a typed language to be "good". But in Go it would be helpful to allow workarounds for modelling problems. As I like the way concurrency is done in Go I tried several times to find programming solutions that can manage without violating visibility rules or having duplicate variables or some other compromise. But there was simply no way.
May 12 2014