Re: [go-nuts] Algorithm Club

2017-03-31 Thread David Collier-Brown
That's an interesting thought: one can generate a generic from a type which has an ordering, and identity and perhaps a few other functions as its interface. That eliminates the "grad student slave writing tests" from the algorithm (;-)) and makes it, in principle, computable in a Go kind of

Re: [go-nuts] Algorithm Club

2017-03-28 Thread gary . willoughby
Parametric polymorphism is enabled by generics. On Friday, 24 March 2017 19:16:24 UTC, Rob 'Commander' Pike wrote: > > Algorithms are not helped by generic types as much as by polymorphism, a > related but distinct subject. > > -rob > > -- You received this message because you are subscribed

Re: [go-nuts] Algorithm Club

2017-03-25 Thread Michael Jones
This is just what I dream of. (Well, not dream really as I do it already with a macro processor, but I dream of it being integrated and robust.) On Sat, Mar 25, 2017 at 8:30 PM Will Faught wrote: > Generics is polymorphism, though; actually, it's a kind of polymorphism >

Re: [go-nuts] Algorithm Club

2017-03-25 Thread Will Faught
Generics is polymorphism, though; actually, it's a kind of polymorphism called parametric polymorphism. It's program behavior that doesn't depend on the types of the data it uses. It's useful for algorithms for types that contain variable types. There are numerous slice, map, and chan utility

Re: [go-nuts] Algorithm Club

2017-03-24 Thread Michael Jones
Type-based generally is all that I ever seem to want...making a macro-like LLRB heap concrete to handle objects of my own type and with my own comparison function. I believe this is what Rob speaks of. I've personally never needed to sort or order a bunch of unknown "things" On Fri, Mar 24, 2017

Re: [go-nuts] Algorithm Club

2017-03-24 Thread Rob Pike
Algorithms are not helped by generic types as much as by polymorphism, a related but distinct subject. -rob On Fri, Mar 24, 2017 at 12:10 PM, Mandolyte wrote: > The recent survey reveled that generics was thing that would improve Go > the most. But at 16%, the responses

[go-nuts] Algorithm Club

2017-03-24 Thread Mandolyte
The recent survey reveled that generics was thing that would improve Go the most. But at 16%, the responses were rather spread out and only 1/3 seemed to think that Go needed any improvement at all - see link #1. I think most will concede that generics would help development of algorithms,