Private default arguments?

bearophile bearophileHUGS at lycos.com
Fri Dec 28 07:42:01 PST 2012


Maxim Fomin:

> What happens when function with private argument is stored in a 
> function pointer?

You have to supply all arguments. I've written this in the 
detailed proposal:
http://d.puremagic.com/issues/show_bug.cgi?id=9229


> I don't like a name for this feature because it breaks logic 
> that private is accessible within module. Perhaps a new name?

I understand. I think proposing a new keyword, or a @keyword, in 
infeasible, because all this stuff not important enough :-(


> I think your private argument constraint can be as easily 
> broken:

I am not concerned by ways to force the usage of those private 
arguments (like taking the address and using it to call the 
function). It's like the yellow-black plastic strips you see 
around. They are there to tell you to not go forward, for a real 
danger or a legal danger, but they don't actually stop you.

Thank you,
bye,
bearophile


More information about the Digitalmars-d mailing list