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
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
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
>
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
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
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