Porting D2 code to D1
Steven Schveighoffer
schveiguy at yahoo.com
Wed Jul 16 11:35:17 PDT 2008
"Jason House" wrote
> It may sound backwards, but I think it may be the best way to get things
> like Tango to move forward to D2.
>
> Tango officially supports D1. If it were to add D2 support, someone would
> have to port the D1 code to D2. Then, with each change, a similar change
> must occur to the D2 code base. From a maintenance standpoint, this
> really shouldn't be acceptable.
>
> Since adding concepts such as const to D1 code in an automated fashion is
> essentially impossible, it seems the best approach is to convert D2 code
> into D1 code. Programatically, it should be pretty easy to remove
> const-awareness. That'd allow Tango to convert to D2 once and then (more
> or less) maintain one code base.
>
> Maybe this would require a few special cases with D1-specific and
> D2-specific code, but I'd hope that wouldn't be very common. I guess I
> have a few questions:
>
> 1. Besides const removal, what else must get done to convert D2 code to D1
> code?
> 2. How can D version-specific code be mixed into a single code base?
> 3. Any thoughts on how to programatically do all the conversions?
> 4. Would this be enough for D1 library maintainers to move to D2?
As someone who has worked on trying to port Tango to D2 (as recently as last
week), I believe there is more work to be done on D2 before anything like
this is considered.
As of now, I have at least one critical bug that must be solved before Tango
on D2 can be done:
http://d.puremagic.com/issues/show_bug.cgi?id=1644
Unless Tango actually builds on D2, there is no point at looking for ways to
port changes back to D1 :)
-Steve
More information about the Digitalmars-d
mailing list