The philosophy of Nothing

Neal Gafter neal at gafter.com
Mon Nov 30 00:54:03 PST 2009


On Sun, Nov 29, 2009 at 10:41 PM, Paul Benedict <pbenedict at apache.org>wrote:

> Thank you for your patience. Is this use case any different than
> reflection or dynamic languages? It sounds like the "Nothing" type
> returns an Object and automatic casting is performed. So why don't we
> just use Object as the return value and force a cast?
>

No cast should be required, as there is no type error.  Moreover, the
compiler should never allow the code to reach a point at which such a cast
could be executed, as a value of type Nothing cannot occur normally (there
are no values of type Nothing).

Cheers,
Neal



More information about the coin-dev mailing list