Re: Guideline for D1/2 compatible code?

2009-01-18 Thread Stewart Gordon
Trass3r wrote: I'd like to use "alias char[] string", but dmd complains about conflicts with the builtin "alias invariant(char)[] string" Is there any way to redefine string in the scope of the library? I don't think so. I know I could simply use another name or use char[] but if it's poss

Re: Guideline for D1/2 compatible code?

2009-01-18 Thread Trass3r
Am 17.01.2009, 23:19 Uhr, schrieb Stewart Gordon : Trass3r wrote: Are there any guidelines for writing code compilable with both dmd 1.x and 2.x? This is to make a library usable by users of either, I presume? Yes. - Have a module to define types for such things as pointers/arrays that

Re: Guideline for D1/2 compatible code?

2009-01-17 Thread Stewart Gordon
Trass3r wrote: Are there any guidelines for writing code compilable with both dmd 1.x and 2.x? This is to make a library usable by users of either, I presume? I can give a few: - Have a module to define types for such things as pointers/arrays that will be const in D2. - Use version(D_Vers

Guideline for D1/2 compatible code?

2009-01-17 Thread Trass3r
Are there any guidelines for writing code compilable with both dmd 1.x and 2.x?