Smooth transition to D2 for Tango users?

Bruno Medeiros brunodomedeiros+spam at com.gmail
Tue Sep 23 10:23:13 PDT 2008


Sergey Gromov wrote:
> Sean Kelly <sean at invisibleduck.org> wrote:
> 
>> Finally, I think the version(D_Version2) idea is backwards.  It should 
>> be version(D_Version1).  The current method isn't forwards-compatible, 
>> so all the code with these version statements in it will break when we 
>> get D version 3.
> 
> I agree here, there's not enough flexibility.  The version identifiers 
> should also have a numeric value, so that you can write:
> 
> version (D_Version, 2)
> {
>   ...
> }
> 
> and the versioned code compiles only if D_Version has value of 2 or 
> greater.

Or just have:
   version(D_Version_2OrAbove) { ...
?

Unless you plan on putting expressions in the version identifier (which 
I don't see a case for), it's just as good.

-- 
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list