On Wed, Aug 5, 2020, 19:39 Tyler Compton <xavi...@gmail.com> wrote: > 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. > >
Hard to say if cast was used instead of "conversion" or "type assertion" or anything else. That's the problem with using terms the language specs avoid for a reason. Perhaps that's was the actual message? > -- 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/CAA40n-Wr1Xqm6q3BEwUvB%3DFXvMMMJaAs1qFvuF8OdhEy5LQz5A%40mail.gmail.com.