Is the bottom type going to be usable?
Neal Gafter
neal at gafter.com
Tue Jan 5 23:17:32 PST 2010
On Tue, Jan 5, 2010 at 8:14 PM, Paulo Levi <i30817 at gmail.com> wrote:
> Would be useful generally for instance for functions that diverge by design,
> for instance just throw a assertion error + a cause.
CfJ's type "Nothing" serves that role
<http://www.javac.info/closures-v06a.html>. That is how we get the
lambda conversion (a rough equivalent of the project lambda strawman
"function conversion") to work for code like this:
#int() f = #() { throw new UnsupportedOperationException(); };
It will be interesting to hear if the (so far anonymous) project
lambda language designers at Sun have other ideas for how (and whether
or not) they expect code like this to compile without error.
More information about the lambda-dev
mailing list