On Thu, Nov 12, 2020 at 5:15 AM 武新飞 <xinfei...@qq.com> wrote:
>
> Here is my suggestion to replace "Type lists in interfaces"
> ```
> type Float interface {
>     type float32, float64
> }
>  ```
> Can be
> ```
> type Float = float32 | float64
>
> type Ordered = int | int32 | ... Float | string
> ```

Thanks for the note.

In the current design draft the section
https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-type-parameters.md#constraint-type-inference
describes a case where we need both a type list and a method.  I don't
see an obvious way to implement that with your suggested syntax.

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcU9e0WKbCkxjBXXxkVYNtwidu1%3Dey1WNMRN-%3DPBHrRpLA%40mail.gmail.com.

Reply via email to