Porting libs to 2.0 (Re: [Issue 1486] New: Can't implicitly convert char[][] to const(char)[][])
Bill Baxter
dnewsgroup at billbaxter.com
Sat Sep 8 08:18:03 PDT 2007
kris wrote:
> Bill Baxter wrote:
> [snip]
>> I'd like to do more in D 2.0, but if the libraries I need aren't
>> ported, it's either spend a lot of time porting them myself, or stick
>> with D 1. Right now D1 seems the better option. But since D1 isn't
>> getting new features I suspect there will come a point when D2 gets
>> something so utterly cool that it's worth doing whatever it takes to
>> use it, including maintaining private 2.0 forks of other people's
>> libraries. Of course by then they might have already ported... so I
>> might as well wait.
>
> Bill,
>
> If there were a clean way to alias or typedef or macro the D2 const
> features (within D1) then Tango and other libraries would quickly become
> available for D2. In other words, the const features of D2 would have to
> be effectively ignored by the D1 compiler (through whatever means), and
> the use of those features in D2 would have to be 'adjustable' in a quick
> and easy manner (to adhere to syntactic changes). Macros might be ideal
> for such a notion?
Macros probably won't be a solution because D1 won't have them.
I think we're stuck with version(D_Version2) + string mixin as the
primary tools.
> Without the ability to retain a single body of source across both D
> versions, and with the syntax of D2 const evolving over time, there's
> little impetus to migrate a library right now
As long as you're willing to at least accept patches that provide
backwards-compatible D2 support, nobody has any business complaining
about that.
But that doesn't change the fact that "lack of libraries" is still the
main reason I haven't moved myself over to D2.0 yet. :-)
--bb
More information about the Digitalmars-d-bugs
mailing list