remove keywords

Robby robby.lansaw at gmail.com
Fri Dec 7 21:18:10 PST 2007


Robby wrote:
> mandel wrote:
>> A proposal in a nutshell:
>>
>> - removal of the keywords "unittest, "version" and similar.
>>
>> - replaced by global compile time variables.
>>
>> - "dmd -<name>=<value>" to set them. Variables not found result in 
>> compiler warnings
>>
>> - "dmd -list version*" or similar to list all global variable names 
>> with prefix "version"
>>
>> -> less keywords, more powerfull control (use in boolean expressions), 
>> more native syntax, easier to understand
>>
>> Ideas? Problems? Objections?
>>
>> btw.:
>> bool enableXYZ;
>>
>> if(enableXFZ) import foo.Bar;
>>
>> ...might be hairy to implement?
> 
> Please please don't. From my standpoint, and converting over 70k lines 
> of code over to D I can attest how easy the simplistic way of how D 
> handles versions is so nice in the long run. I do like the idea of 
> version (a,b,c) though, oddly enough.
> 
> Now if I could get a way to enforce a type can't be null by the language 
> itself, it would save a lot of if(whatever == null) cruft I have lined 
> throughout from the *other* language port we're doing:(.
> 
> yanno, something that says I expect class Whatever, I want class 
> Whatever and don't you damn well give me null.
> 
> I have noticed a push for changing adding complication for unittest as 
> well, but I hope it stays quite similar, though I really would like a 
> lil more fine tuning of how it's ran.
> 
is null*, thinking one thing, writing another. sigh



More information about the Digitalmars-d mailing list