On Fri, 21 Aug 2020 at 15:24, Ian Lance Taylor <i...@golang.org> wrote:

> On Fri, Aug 21, 2020, 12:37 AM 'Axel Wagner' via golang-nuts <
> golang-nuts@googlegroups.com> wrote:
>
>> Just to clarify, the intent is to make the declaration in the spec `type
>> any = interface{}`, not `type any interface{}`, correct? The latter would
>> be more analogous to `error`. Either has certain advantages and
>> disadvantages, I'm not sure which I prefer, but I just want to make sure I
>> understand the plan :)
>>
>
> I've been thinking of a type alias rather than a defined type, but I'm not
> sure which is best.  It would be interesting to hear whether anybody has a
> clear preference, and why.
>

My vote is for a type alias. Using a named type doesn't make any difference
for type parameter constraints, and I'd prefer it if "[]interface{}" and
"[]any" (or other types involving interface{}) weren't incompatible types.
"interface{}" is currently a nice universally understood type - I don't
think it's worth splitting it into two distinct types.

  cheers,
    rog.




> 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/CAOyqgcUFU_Lz0c%3D-6V6N9X2Ku2Hx-9%2BDeHequ0oLX9Soyo_3GQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/golang-nuts/CAOyqgcUFU_Lz0c%3D-6V6N9X2Ku2Hx-9%2BDeHequ0oLX9Soyo_3GQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAJhgacgfGtxA4u3qrB3qpGowFqMBBHCOS%3DcN1NdUmgaiZpZrYw%40mail.gmail.com.

Reply via email to