On Thu, 18 Nov 2010 19:58:42 +0000, %u wrote: > == Quote from Denis Koroskin ([email protected])'s article >> On Thu, 18 Nov 2010 22:19:12 +0300, Walter Bright >> <[email protected]> wrote: >> > Steven Schveighoffer wrote: >> >> My recommendation -- when you are ready, switch wholly to D2. Don't >> >> bother with compatibility, it's just not possible. >> > >> > From what you wrote, it appears that most of the difficulties were >> > in >> > dealing with strings. >> No, it's not. From my experience, a bigger issue is that version (D2) { >> /* some D2 only code involving const etc */ >> } >> simply won't compile in D1, because even if it's D2-only the code needs >> to be correct D1 code as well. > > Wow, that sucks!! > Can't this simply be mended with special D_DMD1 and D_DMD2 (D_DMD3 :) > version identifiers? > If the compiler version isn't the same then it won't look at the code.
No. The contents of a version block is still parsed. If the D2 code doesn't _parse_ as valid D1, then the D1 compiler will reject it, even if the version block will not be processed further than that.
