The Philosophy of Nothing
Paul Benedict
pbenedict at apache.org
Wed Dec 2 08:26:44 PST 2009
Neal,
On Wed, Dec 2, 2009 at 10:07 AM, Neal Gafter <neal at gafter.com> wrote:
> On Wed, Dec 2, 2009 at 7:59 AM, Paul Benedict <pbenedict at apache.org> wrote:
>>
>> Does the spec prevent defining method that can neither return nor throw?
>>
>> public Nothing func() throws Nothing { }
>
> No, because Java has unchecked exceptions, and for other reasons that will
> be more clear when part b (0.6b) is published.
>
> I can't imagine what the value would be of adding such restrictions to the
> specification or compiler.
If a method cannot return nor throw, I would expect this to be an
obvious compilation error. Note this example has nothing to do with
closures, but just a normal method declaration.
Well, I'll have to be patient and wait for 0.6b to explain. I am
hoping that Nothing is used consistently. Thanks, Neal.
Paul
More information about the closures-dev
mailing list