WTF did happen with struct constructor and ref in 2.061 ?
Mehrdad
wfunction at hotmail.com
Sat Jan 5 10:38:29 PST 2013
On Saturday, 5 January 2013 at 12:58:49 UTC, js.mdnq wrote:
> You are saying because "visually" foo(S(2)) leaves the "scope"
> it is different than the others.
No, he is saying so because the LANGUAGE (and I don't mean the
_compiler_) defines what "scope" means, and it also defines when
anything enters/leaves some scope.
It also defines the lifetimes of variables, and for structs,
that's bounded to their scope.
Your perception of what *COULD* have been an alternate definition
(or implementation) has zero bearing on anything, because that's
not what it means in D, period.
More information about the Digitalmars-d
mailing list