[dmd-beta] D 1.074 and 2.059 betas

Jonathan M Davis jmdavisProg at gmx.com
Fri Apr 6 00:17:10 PDT 2012


On Friday, April 06, 2012 03:10:15 Nick Sabalausky wrote:
> I'm not necessarily saying that struct literals should be lvalues, but how
> am I supposed to reasonably make a program work on both 2.058 and 2.059?

You don't. It's a breaking change. The same will likely happen once Object 
becomes const-correct. While dmd and the language are far more stable than 
they used to be, breaking changes do occur upon occasion, making it so that 
new code cannot be compiled on older versions of the compiler or vice versa.

I suppose that you could use a version block and use a specific version for 
2.058 if you really wanted to be able to compile it on both, but since it's a 
breaking change, it's not going to "just work."

However, why would you really want to be able to build with 2.058 once 2.059 
is out? Granted, in the long run, breaking changes should become very uncommon 
such that it doesn't really matter which version of the compiler you're using 
for most things, but still, I don't see why you can't just say that the latest 
compiler is required to use your code if you're posting it somewhere.

- Jonathan M Davis


More information about the dmd-beta mailing list