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

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 13 12:59:13 PDT 2014


On Sunday, 12 October 2014 at 21:51:33 UTC, Jonathan M Davis via
Digitalmars-d wrote:
> Perhaps, but this change is so straightforward that I would 
> expect that even a
> very large codebase could be updated in a very short space of 
> time. And since
> it'll be generating deprecation messages - not errors - and 
> it's for a
> practice that we've already been discouraging for some time 
> now, I don't think
> that waiting for dfix buys us much. I totally agree that it 
> would be nice to
> have, but I don't see it as a showstopper at all. The only 
> significant problem
> I see is dmd's headergen, because if that's putting const on 
> the left, then
> it'll generate code that will then be warned about, which would 
> definitely be
> bad. The ddoc generation should be fixed to, but that can be 
> done later,
> because the semantics won't have changed; it's just that if you 
> do it in your
> own code, you'll get a deprecation message.
>
> I'd very much like to see this change made sooner rather than 
> later. I think
> that it continues to harm us as long as it isn't changed, and 
> the change
> really doesn't cost much even if your whole codebase needs to 
> be updated,
> because it's very simple and straightforward.
>
> - Jonathan M Davis

The right path forward seems to be deprecating now, but not
removing before dfix can do something good about it.


More information about the Digitalmars-d mailing list