Re: Optional arguments/parameters

2014-05-28 Thread Dicebot via Digitalmars-d
On Wednesday, 28 May 2014 at 17:11:09 UTC, Ary Borenszweig wrote: But there is a 'this' in that place (it's not a static function). Should I file this as a bug? I can't find exact place in spec but AFAIK default arguments in D are evaluated in context of call scope, same as in C. Could have

Re: Optional arguments/parameters

2014-05-28 Thread Ary Borenszweig via Digitalmars-d
On 5/28/14, 8:54 AM, Wanderer wrote: Java misses this feature badly, forcing programmers to copy-paste bloated code (constructor A calls constructor B with fewer arguments, constructor B calls constructor C etc, same thing with methods). Please tell me, does D support this feature? int myNiceFun

Re: Optional arguments/parameters

2014-05-28 Thread Wanderer via Digitalmars-d
On Wednesday, 28 May 2014 at 13:01:52 UTC, bearophile wrote: Wanderer: Please tell me, does D support this feature? You can answer by yourself similar questions online here: http://dpaste.dzfl.pl/ Bye, bearophile Thanks! :-)

Re: Optional arguments/parameters

2014-05-28 Thread bearophile via Digitalmars-d
Wanderer: Please tell me, does D support this feature? You can answer by yourself similar questions online here: http://dpaste.dzfl.pl/ Bye, bearophile

Re: Optional arguments/parameters

2014-05-28 Thread Rene Zwanenburg via Digitalmars-d
On Wednesday, 28 May 2014 at 11:57:51 UTC, Namespace wrote: On Wednesday, 28 May 2014 at 11:54:30 UTC, Wanderer wrote: Java misses this feature badly, forcing programmers to copy-paste bloated code (constructor A calls constructor B with fewer arguments, constructor B calls constructor C etc,

Re: Optional arguments/parameters

2014-05-28 Thread Namespace via Digitalmars-d
On Wednesday, 28 May 2014 at 11:54:30 UTC, Wanderer wrote: Java misses this feature badly, forcing programmers to copy-paste bloated code (constructor A calls constructor B with fewer arguments, constructor B calls constructor C etc, same thing with methods). Please tell me, does D support this

Optional arguments/parameters

2014-05-28 Thread Wanderer via Digitalmars-d
Java misses this feature badly, forcing programmers to copy-paste bloated code (constructor A calls constructor B with fewer arguments, constructor B calls constructor C etc, same thing with methods). Please tell me, does D support this feature? int myNiceFunc(double a, double b=0, int c=0) {.