Porting D2 code to D1
Jarrett Billingsley
kb3ctd2 at yahoo.com
Thu Jul 17 08:13:42 PDT 2008
"Jason House" <jason.james.house at gmail.com> wrote in message
news:g5nhb4$r9d$1 at digitalmars.com...
> Jarrett Billingsley Wrote:
>
>> "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.
>
>
> Who says what's in version(d1) has to be legal D1 code? ;) I'd vote that
> the code would still look like D2 code and would be converted in the same
> way as all other code.
Oh, oh, I see what you're saying now. Those version blocks would just be
dealt with by the converter, not the compiler.
More information about the Digitalmars-d
mailing list