[Issue 12313] Unneeded stack temporaries created by tuple foreach
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 7 07:54:24 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12313
Vladimir Panteleev <thecybershadow at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |thecybershadow at gmail.com
--- Comment #3 from Vladimir Panteleev <thecybershadow at gmail.com> 2014-03-07 17:54:23 EET ---
(In reply to comment #2)
> It does not also make any sense from language semantics point of view as
> a.tupleof is effectively tuple of variable aliases. And there is no such thing
> as `ref alias`.
>
> Sounds more like a hack to fix another hack.
I see it more like the foreach body being like a function (whose body is
implicitly inlined). In this context, "ref" works out fine. Since .tupleof only
enumerates fields, and not functions, each member can be mapped to a concrete
value (and thus can work with "ref").
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list