>   Robert Engels <reng...@ix.netcom.com> wrote about what
>> Christian Surlykke <christ...@surlykke.dk> wrote:

> The static switch is a big problem. For any complex method you are going to
> completely duplicate all of the code. Not good. 

Now the same straw man argument I read in "critique" about my [1] solution is
raised against other person's proposal. 

No! One need not to "completely duplicate" the code. Not even to mention
"all", or most. And "static switch" is **not** "a big problem". 
It is a solution to the problem. 

For the practical generic code we need to deal with outstanding cases/types
via the variant generation. Usually, a variant involving **different** code
or even different underlying algorithm. That's what a `compile-time switch`
over possible specialized code variants is for. Both in mine's and in Chris'
proposal.

> Far better to map operators to interfaces then you only need a single
> method implementation. 

Oh, just a single? Rly? Just a single method implementation for each of
possibly hundreds or thousands of future user types? Aren't you "going
to completely duplicate all of the code"? Even for non-complex methods?
(Its current state of affairs, btw).

@Christian  <christ...@surlykke.dk>
Read other threads' replies made from reng...@ix.netcom.com, esp ones of
"java's better" attitude, before you start to write a reply to an unfounded
critique. Fighting someone else's straw man makes no sense at all.

[1] https://github.com/ohir/gonerics

-- 
Wojciech S. Czarnecki
 << ^oo^ >> OHIR-RIPE

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