[Issue 8075] Optional parameters should be able to refer to previous parameters
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 10 04:56:55 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8075
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schveiguy at yahoo.com
--- Comment #1 from Steven Schveighoffer <schveiguy at yahoo.com> 2012-05-10 04:58:18 PDT ---
I really like this idea.
But there must be a provision that the expression isn't substituted wholesale.
For instance, your example should not expand to:
process([1, 2, 3], [1, 2, 3].length);
which allocates *twice*, the second time just to get the length. It should
really expand to this:
auto items = [1, 2, 3];
process(items, items.length);
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list