On Wed, Aug 5, 2020 at 1:07 AM Jan Mercl <0xj...@gmail.com> wrote:

> It's not supposed to be anything special whatsoever. Just like number
> zero or an empty set is not some kind of an exception. It's just you
> cannot have any reasonable set theory without it.
>

I think it's fair to say that `interface{}` is somewhat special in practice
because it acts as an escape hatch from the type system when necessary. No
other interface is capable of being satisfied by values of all types. I
assume that the `error` interface is pre-declared because it's a very
common interface used across almost all Go code. If `interface{}` is to
become even more common than it is thanks to generics, I think it could be
reasonable to follow the same thinking.

Go programmers do avoid casting because Go has no casting. That word
> or its stem doesn't even appear in the language specs.
>

Something tells me you knew Carla was referring to type assertions.

-- 
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/CAA%3DXfu0c-BqTt6vOjbE9ezur0nNNFCSBhgs%3DPFrEUBPASziinw%40mail.gmail.com.

Reply via email to