Hi Brian,

Thanks for your reply but I don’t think you get my point, what I mean is
constraint should be always explicitly specified, so we should not support
“optional” or “omitted” constraints.

On Wed, 17 Jun 2020 at 12:51, Brian Candler <b.cand...@pobox.com> wrote:

> Consider a generic where you want T1 unconstrained but T2 constrained.  If
> you write
>
> func Foo(type T1, T2 Bar)
>
> then Bar constrains both.  Hence the need for
>
> func Foo(type T1 interface{}, T2 Bar)
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/golang-nuts/ztJvMz-FxbY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/7df05c73-7c35-43e5-bdb4-44b6a73867cfo%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/7df05c73-7c35-43e5-bdb4-44b6a73867cfo%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
-- 
Hǎiliàng

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAF9a%2BA6-gNCaM5%3D77V%3DP1DnOAxGz-GTngY1bfpiFWTUKXkf%3Dtg%40mail.gmail.com.

Reply via email to