DMD 0.163 release
James Dunne
james.jdunne at gmail.com
Thu Jul 20 15:14:14 PDT 2006
Walter Bright wrote:
> Bruno Medeiros wrote:
>
>> Nice update!
>>
>> Walter Bright wrote:
>>
>>> 1) didn't want to add new keywords, especially ones like 'as' as I
>>> use that as a variable name
>>>
>>
>> But would that require adding them as keywords? I mean, since the "as"
>> (or whichever) appears in a specific and separate context, just as the
>> "exit", "success" and "failure" of the scope statement, which are not
>> keywords?
>
>
> Context dependent keywords are generally considered a bad idea. The
> scope words can never be confused with any identifiers, so I think
> that's not quite the same thing.
What's so bad about context dependent keywords? They're great for
disambiguating confusing syntax and making it more readable:
alias 'type' as 'identitifer'
Now you know the order of the alias statement; it reads left to right.
You don't have to force 'as' to be a real keyword and effectively
disallow its use as a variable.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/MU/S d-pu s:+ a-->? C++++$ UL+++ P--- L+++ !E W-- N++ o? K? w--- O
M--@ V? PS PE Y+ PGP- t+ 5 X+ !R tv-->!tv b- DI++(+) D++ G e++>e
h>--->++ r+++ y+++
------END GEEK CODE BLOCK------
James Dunne
More information about the Digitalmars-d-announce
mailing list