https://issues.dlang.org/show_bug.cgi?id=8121
Jonathan M Davis <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #6 from Jonathan M Davis <[email protected]> --- Right now, scope does _nothing_ except for delegates, and I'm not sure how well it's implemented for them. In all other cases, it's essentially a pointless attribute. It's not even properly defined at this point exactly what scope should mean. We all have a rough idea of what it should mean - that the parameter shouldn't escape the scope of the function - but what exactly that ultimately means has never been properly defined. As such, it really doesn't matter if scope ref is illegal. Arguably, scope on _anything_ other than a delegate should be illegal (the same with in, since it's an alias for const scope), because it does _nothing_ and has yet to be properly defined, meaning that it may or may not do what you expect once it's been properly defined and implemented. So, I think that it's good to take note the compiler currently doesn't allow scope ref for whatever reason so that that can be taken into account when scope is finally ironed out, but until then, it really doesn't matter. I'd strongly argue that if you're using scope on anything other than delegates right now, you should stop, because it has no effect on your code right now but very well could later - and not necessarily how you expect. --
