Walter Bright:

> I don't see how it could be called a dirty hack.

Because it's untidy, in the source code it looks like the information of the 
default value is located in the function definition, while in truth it is 
stored elsewhere.
This can be more efficient, but it is not tidy, this abstraction can leak a 
lot, you can see it here:
http://d.puremagic.com/issues/show_bug.cgi?id=4028
Maybe this too is related:
http://d.puremagic.com/issues/show_bug.cgi?id=3430

I presume this part of the D design will not change (even if a solution for 
those two bugs need to be found), but a language designer must be able to tell 
apart what is done for efficiency (putting the information of the default 
arguments at the calling point) and what's the right and tidy thing to do 
(putting this information somehow connected to the function itself).

Bye,
bearophile

Reply via email to