6 Sep 08:11
[Fwd: Re: [groovy-user] Support for unless / if expressions]
From: Paul King <paulk@...>
Subject: [Fwd: Re: [groovy-user] Support for unless / if expressions]
Newsgroups: gmane.comp.lang.groovy.user
Date: 2008-09-06 06:13:53 GMT
Subject: [Fwd: Re: [groovy-user] Support for unless / if expressions]
Newsgroups: gmane.comp.lang.groovy.user
Date: 2008-09-06 06:13:53 GMT
Not sure if this came through ...
From: Paul King <paulk@...>
Subject: Re: [groovy-user] Support for unless / if expressions
Date: 2008-09-05 23:12:40 GMT
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
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
RSS Feed