An interesting and (for me at least) novel approach to contract-free 
generics.

Despite the suggestions towards the end, it's still too verbose for my 
taste but I did find it reassuring that, even without operator overloading 
(Eric's proposal), there would still be a plausible way to write generic 
functions which unified built-in and user defined types.

Alan

On Tuesday, October 16, 2018 at 11:34:10 AM UTC+1, Patrick Smith wrote:
>
> Yet another generics discussion at 
> https://gist.github.com/pat42smith/ccf021193971f6de6fdb229d68215302
>
> This one looks at what programmers would be able to do if very basic 
> generics were added to Go, without contracts. Generic functions may not use 
> methods or operators of their type parameters.
>
> The answer is quite a lot, actually. The code would be verbose, but not 
> impossibly so.
>

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to