Private default arguments?

Jonathan M Davis jmdavisProg at gmx.com
Sat Dec 29 01:18:21 PST 2012


On Saturday, December 29, 2012 07:01:42 bearophile wrote:
> Jonathan M Davis:
> > I really think that this is a non-issue.
> 
> It's not a necessary feature, but it helps make the code more
> readable, shorter, keeping it safe. I write several recursive
> functions, and I'd like a way to refer to the function inside the
> function without using its real name, something like self(), or
> even __function(). Private default arguments help further the use
> of recursion.

AFAIK, not even functional languages where recursion is what you always do 
have anything like what you're suggesting. I really don't see it as any real 
cost to do recursion use the function's name. So, feel free to bring it up as 
a feature that you'd like, but I really think that it's trying to solve 
something that really isn't a problem in the first place. And this is coming 
from someone who used to program in haskell quite a bit.

- Jonathan M Davis


More information about the Digitalmars-d mailing list