Porting D2 code to D1

Jarrett Billingsley kb3ctd2 at yahoo.com
Wed Jul 16 13:17:55 PDT 2008


"Jason House" <jason.james.house at gmail.com> wrote in message 
news:g5lib0$23ju$1 at digitalmars.com...

> I can't imagine any library maintainer being willing to do that just for 
> portability between D versions.  It'd be nice if D2 code could have 
> something like version(d1){} and version(d2){} for this purpose.  That'd 
> then allow the d2 compiler to ignore version(d1){} and allow the converter 
> to strip out version(d2){}

I've always been dubious about using the version construct for various 
language versions.  It's great for program options, but since the stuff in 
the version block has to be syntactically legal, it makes it worthless for 
supporting multiple versions of D.

It's almost like another construct is needed.  I like what you're thinking 
but I don't know if using the version construct is the right way to do it. 





More information about the Digitalmars-d mailing list