Quoting Eric Raymond (2018-10-16 16:37:01)

> you either compile "a < b" using the "implements <" method of the
> concrete type or throw an error.

>      This means that a change in the generic function, which happens to
>      introduce a new use of the parameter, can cause a failure at the
>      call
>      site, which may be far away.
>
> That doesn't seem to me to entail more risk than *any* change to the
> generic function would.

The trouble is that (in the case where you compile using the implements
<, rather than throwing an error) the type signature no longer tells you
what the constraints actually are; this information is only in the body
of the function, so it's easy to accidentally change it when changing
something that you think is just implementation detail.

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