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{...}
(Continue reading)

Jochen Theodorou | 6 Sep 08:32
Gravatar

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

Paul King schrieb:
> 
> Not sure if this came through ...

nope

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

lol!

bye blackdrag

--

-- 
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/
http://www.g2one.com/

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

    http://xircles.codehaus.org/manage_email

Russel Winder | 6 Sep 08:34

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

On Sat, 2008-09-06 at 16:13 +1000, Paul King wrote:
> Not sure if this came through ...

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

Ah... shades of the COMEFROM statement:

http://www.fortran.com/come_from.html

http://en.wikipedia.org/wiki/COMEFROM

F.X.Reid is of course the expert on this statement (see
http://www.bcs-facs.org/newsletter/facts200603.pdf), indeed most of his
work is well worth reading, especially "The Song of Hakawatha", but this
is only for those with an attention span of more than 2s :-)

--

-- 
Russel.
====================================================
Dr Russel Winder                 Partner

Concertant LLP                   t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,              f: +44 8700 516 084
London SW11 1EN, UK.             m: +44 7770 465 077

Gmane