Re: Best practice for strings across D1 and D2

2011-03-17 Thread Trass3r
nedbrek Wrote: > 2) What is the best way to make the same declarations work for D1 and D2? > It seems everything inside a "version" statement must parse correctly, and > D1 doesn't want to parse "immutable(char)"... You may also use versioned aliases. Just include the D2 code via a string mixin

Re: Best practice for strings across D1 and D2

2011-03-15 Thread Denis Koroskin
On Wed, 16 Mar 2011 02:40:32 +0300, nedbrek wrote: Hello, I have some wrappers for C functions which I am exporting to D. For D1, I can just use char*. For D2, I get compiler errors when I try to assign string constants to my char* variables. It seems the best way is to make them immutabl

Best practice for strings across D1 and D2

2011-03-15 Thread nedbrek
Hello, I have some wrappers for C functions which I am exporting to D. For D1, I can just use char*. For D2, I get compiler errors when I try to assign string constants to my char* variables. It seems the best way is to make them immutable(char). 1) If I make the functions take immutable(ch