News for hackers. Stuff that matters.
Re:Typed nils in Go 2 by masklinn on Friday August 11, 2017 @06:59AM (#14988348)
> My question is: what are the legitimate use cases for interfaces that are half-nil?

I think that's two different questions:

* Is there a legitimate use case for nil not being nil? I don't think so.

* Is there a legitimate use case for having "typed nil" interfaces? Kinda, Go supports and encourages calling methods "with nil receivers", and doing that through an interface requires that the concrete type (the non-nil half) be conserved otherwise you can't dispatch the method call.

There are no comments on this comment yet.