Make const, immutable, inout, and shared illegal as function attributes on the left-hand side of a function

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 14 09:12:32 PDT 2014


"John Colvin"  wrote in message news:ljjtmnnckwzenvhawawx at forum.dlang.org...

> [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.  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. 



More information about the Digitalmars-d mailing list