Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #2073 (new enhancement)

Opened 13 years ago

Add lazy default parameter to Arguments

Reported by: doob Assigned to: community
Priority: major Milestone: 1.0
Component: Tango Version: 0.99.9 Kai
Keywords: Cc:

Description

This patch makes it possible to have a lazy default parameter of an argument. The attached patch adds an overload on the "defaults" method to Argument. The new method takes a delegate that returns a char[]. If this method has been called the returned value of the delegate takes precedence over the other default parameters when "assigned" is called. This makes it possible, for example, to have a default parameter that is based on the value of another parameter.

Attachments

arguments.d.patch (1.8 kB) - added by doob on 09/01/11 18:19:48.

Change History

09/01/11 18:19:48 changed by doob

  • attachment arguments.d.patch added.