Paul King | 6 Sep 08:11
Favicon
Gravatar

[Fwd: Re: [groovy-user] Support for unless / if expressions]


Not sure if this came through ...

Favicon Gravatar
From: Paul King <paulk@...>
Subject: Re: [groovy-user] Support for unless / if expressions
Date: 2008-09-05 23:12:40 GMT

I propose that instead of "else unless" we introduce
the "useless" operator and instead of "otherwise unless"
the "unwise" operator! :-)

Paul.

TrnsltLife wrote:
> I'm OK with the idea of unless(condition){block}, but what would be the
> syntax comparable to if(...){...} else if(...){...}?  
> 
> unless(...){...} else unless(...){...} else if(...){...}
> 
> Maybe we should allow
> unless(...){...} otherwise unless(...){...} otherwise if(...){...}
> otherwise{...}
> 
> Because I really don't like the sound of "else unless". On the other hand,
> "else if" doesn't sound right until you're used to it, so maybe it doesn't
> matter.
> 
> Jeremy

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Gmane