D1, D2 and the future of libraries

Jacob Carlborg doob at me.com
Sun Jan 22 11:40:24 PST 2012


On 2012-01-21 17:07, Stewart Gordon wrote:
> For the last however long, I've been still programming mostly in D1, but
> aiming to keep my libraries compatible with both D1 and D2.
>
> But changes in D2 have made this more of a challenge. I've also been put
> off switching to D2 by the wait for D1 to be finished.
>
> Now the plan to discontinue D1 at the end of the year has been
> announced. And I'm wondering what to do with my libraries.
>
> How many people here are still using D1?
>
> What are those of you who write libraries mainly doing?
> (a) supporting only D1?
> (b) supporting only D2?
> (c) releasing separate D1 and D2 versions?
> (d) using versioning to support both with one set of code files?
>
>
> If practically everyone's using D2 now, maybe I'll migrate my libraries
> to it. If, OTOH, there's still real demand for D1 libraries, I'll
> continue to support D1. I might have to see how supporting D2 as well
> works out. It seems I'll have to abandon the idea of keeping the code
> compatible with the D spec as of DMD 1.00. It seems the reasons for
> doing this never happened anyway, and there doesn't seem to be an
> equivalent milestone in D2.
>
> Thoughts?
>
> Stewart.

I have a kind of mix of projects. Most are D1 only, but I'm starting to 
move to D2.

* Orange, DWT - D1 and D2 mixed in the same code base using version 
statements

* DVM - D1, I plan to port this to D2

* Orbit - D1 and D2, separate git branches. I just ported this to D2

* Some other minor projects - D1 only. I'll probably port these to D2 if 
I continue to work on them

* DStep - D2

Supporting both D2 and D1 in the same code base using version statements 
is not recommended and requires extra work and the use of string mixins. 
If you want to support both D2 and D1 I recommend different branches.

I think the reason for why I'm porting my projects to D2 is that now 
Tango is available for D2.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list