[Issue 8075] Optional parameters should be able to refer to previous parameters
https://issues.dlang.org/show_bug.cgi?id=8075 Iain Buclaw changed: What|Removed |Added Priority|P2 |P4 --
[Issue 8075] Optional parameters should be able to refer to previous parameters
http://d.puremagic.com/issues/show_bug.cgi?id=8075 Steven Schveighoffer schvei...@yahoo.com changed: What|Removed |Added CC||schvei...@yahoo.com --- Comment #1 from Steven Schveighoffer schvei...@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: ---
[Issue 8075] Optional parameters should be able to refer to previous parameters
http://d.puremagic.com/issues/show_bug.cgi?id=8075 --- Comment #2 from wfunct...@hotmail.com 2012-05-10 15:12:23 PDT --- Also, not sure if this is a related or a separate issue, but we should also be able to refer to this object inside the optional arguments... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---