[Issue 17928] [scope] `in` is not treated as `const scope`

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 30 11:08:36 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=17928

--- Comment #3 from anonymous4 <dfj1esp02 at sneakemail.com> ---
(In reply to Jonathan M Davis from comment #2)
> Personally, I think that it was a mistake to create a storage class which
> was equivalent to two other storage classes, but clearly, a number of folks
> like the idea.

scope const is very common, so shorthand is useful.

> I suspect that a lot of folks use in simply because it looks like the
> opposite of out and don't really understand what it's supposed to do.

I don't think it's the case, because compiler already performed optimizations
based on meaning of scope. The problem is that scope was used in a way that
can't be checked by the compiler.

--


More information about the Digitalmars-d-bugs mailing list