On Sat, Jul 29, 2017 at 5:18 PM <[email protected]> wrote:
> write a compile time type safe generic reduce function with the following
signature which works for all slices of any element type :
>
> func reduce<A,B>(array []A,out B,in A)B {}
> you can't do that in Go .
You've nonchalantly changed topic, even though no one said you can do
everything without generics. (BTW: You can, ask Mr. Turing for details.)
> Interfaces won't help either when you're basically using them as C
(*void) .
Are you really telling me you consider void*, carrying no type information
whatsoever, equal to interface{} which carries full type information? If
so, I can't help you, sorry.
--
-j
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.