A syntax option (function types versus arrays)

John Nilsson john at milsson.nu
Sat Feb 27 07:14:56 PST 2010


On Sat, Feb 27, 2010 at 4:10 PM, John Nilsson <john at milsson.nu> wrote:

> (T)-> throws X (U)->V
> (T)-> ((U)->V) throws X
> T -X> U -> V
>

Or, (throws X) could be seen as a return type of its own (replacing Nothing
in some instances)

So the following are equally correct

T -> throws X | (U) -> V
T -> ((U) -> V) | throws X

Another usage would be
public throws X error(String msg))
{
   throw new ...
}

which would be the same as
public Nothing error(String msg) throws X

BR,
John


More information about the lambda-dev mailing list