while(...){ ... }else ...

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 18 15:06:14 PST 2015


On Sun, 18 Jan 2015 22:56:23 +0000
Jens Bauer via Digitalmars-d <digitalmars-d at puremagic.com> wrote:

> On Sunday, 18 January 2015 at 18:16:47 UTC, Marc Schütz wrote:
> > Unfortunately, this would break existing code:
> 
> That is absolutely correct. Good catch. I did not think of that 
> particular case.
> 
> However... What if the 'else', which "belongs" to while, is named 
> differently, for instance ...
> 
> while(expression1)
> {
> }
> otherwise if(expression2)
> {
> }
> 
> I know otherwise is a longer word, but it would not clash with 
> existing code.
it will introduce a new keyword, and it will break any code which using
"otherwise" as identifier. as far as i can tell this (introducing new
keyword) is one of the hardest thing to do, 'cause Walter will reject
it without second thought (and he will be perfectly right).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150119/7cd4e3a7/attachment-0001.sig>


More information about the Digitalmars-d mailing list