On Tuesday, 23 April 2013 at 14:25:36 UTC, Andrei Alexandrescu wrote:
Now, this may be too naive, but what about allowing the compiler to pass regular (not declared ref) const arguments per reference as it sees fit?
It would be just another optimization.

I'd declare function(const arg) and that would be it.

Aliasing would kill that. We considered it.

Andrei

I assume you're talking about this:
http://forum.dlang.org/post/4f8c93a4.10...@erdani.com

I guess, "difficult to figure" means that the notorious sufficiently smart compiler is unrealistic. Too bad, because I don't like the idea of adding verbosity (auto ref) for the common case. pure and @safe already have that flaw, and I'd rather see no more semi-compulsory keywords.

Reply via email to