Extended Type Design.

Bill Baxter dnewsgroup at billbaxter.com
Fri Mar 16 16:59:19 PDT 2007


Andrei Alexandrescu (See Website For Email) wrote:
> sclytrack wrote:
>>> IMHO (b) should be 'readonly' and (c) should be 'const'.
>> [snip]
>>
>> vote++
>>
>>
>> Keywords
>> --------
>>
>> I also think keywords can be written attached to one another.
>> Like if you were to really call it "super const" have it called
>> superconst instead of super_const.
> 
> Yet you write static const not staticconst; public static not 
> publicstatic; static if and not staticif; and so on.
> 
> superconst came up too. But it creates a bad precedent. A healthier 
> precedent is to synthesize phrases, not new keywords, from the existing 
> keywords. Think of "static if" or "final switch". Very beautiful.
> 
>> It is like the foreach_reverse that we have in D. Why not
>> call it foreachreverse instead.
> 
> Probably it's best to call it foreach reverse. It's unambiguous, easy to 
> parse, does not add new keywords, and continues another nice precedent 
> set by extern(language) and by scope(exit).

So you mean foreach(reverse) then?  I do like that!  You're right that 
it is quite D-like.  Too bad you weren't around back when 
foreach_reverse was introduced?   ;-)

--bb



More information about the Digitalmars-d mailing list