Private default arguments?
Jonathan M Davis
jmdavisProg at gmx.com
Fri Dec 28 20:29:06 PST 2012
On Friday, December 28, 2012 19:17:45 Peter Alexander wrote:
> On Friday, 28 December 2012 at 10:58:59 UTC, bearophile wrote:
> > An alternative idea (that I maybe I proposed years ago in a
> > weaker form) is to introduce 'private' default arguments (they
> > must have a default value):
> >
> > Is this little feature worth the amount of language complexity
> > increase it causes?
>
> I don't think it is, given how easy it is to work around.
Agreed. All you need to do is create an inner function which holds the
majority of the function's body or a private function which does the same (and
it can even have exactly the same if you want it to avoiding the need to come
up with another name). I really think that this is a non-issue.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list