Quoting Andy Balholm (2018-10-20 17:34:15)

> It’s just one of probably dozens of types of operations that people
> will want generic types to be able to support, besides method calls and
> operators. Adding support for them wouldn’t be very hard either, but by
> the time you got done, the result might be about as complicated as
> contracts.

I am not convinced. My proposal goes through *every* example in the
examples section at the end of the draft. Throughout all of the
discussions on this list I have seen very few, if any, compelling
uses that contracts can handle but operator overloading + interfaces
can't (I can't think of one).

It's also not just a question of complexity per se -- it's also
that contracts have too much overlap with interfaces (which are not
going away). I also don't think they provide a very good way of
expressing intent. Even so, as I mentioned above, the interfaces +
operator overloading route covers basically everything I've seen. And
it's still simpler.

-Ian

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