Number literals (Was: Re: Case Range Statement ..)

Rainer Deyke rainerd at eldwood.com
Tue Jul 7 22:08:28 PDT 2009


Andrei Alexandrescu wrote:
> Derek Parnell wrote:
>> I would not complain if trailing dot and leading dot were disallowed.
> 
> I think the question that should be asked is: would anyone complain if
> they were kept? We have bigger rocks to move than that one.

It seems rather disingenuous to complain loudly about '...' used as a
separator, but to accept leading/trailing dots without question.  I'm
sure you remember this list:

> 0.....wyda
> 0....wyda
> 0... .wyda
> 0. .. .wyda
> 0.... wyda
> 0. ...wyda
> 0. ....wyda
> 0.. .wyda

I'm sure you agree that this is a mess.  Never mind if any of these
token sequences are syntactically valid, this is a mess at the lexical
level.  If '0.....wyda' is interpreted as the token sequence '0. ... .
wyda', then you have bigger things to worry about than whether or not
that token sequence is ever syntactically valid.


-- 
Rainer Deyke - rainerd at eldwood.com



More information about the Digitalmars-d mailing list