On Fri, Oct 19, 2018 at 1:26 PM Eric S. Raymond <e...@thyrsus.com> wrote:
>
> Burak Serdar <bser...@ieee.org>:
> > So the question is: do we really need to declare exactly what the
> > implementation of a generic needs in the contract, or is it sufficient
> > to say "use this with values that are like type X"?
>
> I think the additional explicitness of "implements" is valuable.  And
> my syntax is lighter-weight than yours - which in a language like Go
> that highly values parsimony has some significance.

I don't agree.

>
> That said, the shared idea of defining contracts via implied typeclasses
> is, I think, more important than the ways in which our proposals differ.

I agree.

One other difference between the two is the ability of the "like"
syntax to use a struct as well as an interface for templates, so you
can require concrete implementations to have certain fields, instead
of getter/setters.

> --
>                 <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>
>
> My work is funded by the Internet Civil Engineering Institute: 
> https://icei.org
> Please visit their site and donate: the civilization you save might be your 
> own.
>
>

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