On Tuesday, 14 October 2014 at 16:11:34 UTC, Daniel Murphy wrote:
"John Colvin" wrote in message
news:[email protected]...
[2] By easily managed I don't mean sed-able, or even
tooling-fixable. For me it pivots on being able to maintain
one code-base that will compile with multiple compiler
versions. An example where this fails: @nogc, being an
attribute, isn't aliasable, meaning you can't version it out
neatly.
There is nothing stopping you from not supporting @nogc until
your oldest supported dmd version has it.
Good point.
It would be nice to be able to take advantage of new features
though, whilst maintaining backward compatibility. Also, a 3rd
party project could make @nogc a requirement, meaning I have to
choose between compatibility with older compilers or with that
3rd party code. Alias-able attributes would help a lot.
I agree with your requirement, but this is not a good example
of it. A better example would be requiring nothrow annotations
on inline asm blocks, because the old code won't compile with
newer dmds and the new code won't compile with older ones.
Yes, that's a more concrete example, thanks.