www.digitalmars.com         C & C++   DMDScript  

D - Default arguments please!

reply "Charles Sanders" <sanders-consulting comcast.net> writes:
Having 10 different constructors to simulate default arguments becomes
really hard to maintain when you want to modify the structure.  I realize
this is probably very difficult but I think its very important, it would
make life _alot_ easier.

Also could you put ( im not sure what you call this )

operator char [] () {}

and the like on the wish list ?


Lets all ask walter to give us default arguments, rally round the flag!

C
Nov 21 2003
next sibling parent reply Raiko <Raiko_member pathlink.com> writes:
In article <bpmn7d$145f$1 digitaldaemon.com>, Charles Sanders says...
Having 10 different constructors to simulate default arguments becomes
really hard to maintain when you want to modify the structure.  I realize
this is probably very difficult but I think its very important, it would
make life _alot_ easier.

Also could you put ( im not sure what you call this )

operator char [] () {}

and the like on the wish list ?


Lets all ask walter to give us default arguments, rally round the flag!

C
Default arguements would be nice to have, as long as they could be spread throughout the function declaration instead of just at the end. I always had trouble with remembering to put them at the end (gotta love compiler freak outs =P)
Nov 21 2003
parent Sarat Venugopal <sarat removeme.huelix.com> writes:
[...]
 
 Default arguements would be nice to have, as long as they could be spread
 throughout the function declaration instead of just at the end. 
That would require named argument support.
 I always had trouble with remembering to put them at the end (gotta love
compiler freak outs
 =P)
That's not so bad, if the compiler can remind you. One is more concerned about subtle runtime errors that result (due to any feature), because the compiler has no problems with the code syntactically and semantically. Cheers, Sarat Venugopal
Nov 22 2003
prev sibling parent reply "Luna Kid" <lunakid neuropolis.org> writes:
"Charles Sanders" <sanders-consulting comcast.net> wrote in message
news:bpmn7d$145f$1 digitaldaemon.com...
 Having 10 different constructors to simulate default arguments becomes
 really hard to maintain when you want to modify the structure.  I realize
 this is probably very difficult but I think its very important, it would
 make life _alot_ easier.

 Also could you put ( im not sure what you call this )

 operator char [] () {}

 and the like on the wish list ?


 Lets all ask walter to give us default arguments, rally round the flag!
I'd welcome that, too. With even the named arg. syntax, it would be fabulous... Sz.
Nov 24 2003
parent "Matthew Wilson" <matthew.hat stlsoft.dot.org> writes:
 Having 10 different constructors to simulate default arguments becomes
 really hard to maintain when you want to modify the structure.  I
realize
 this is probably very difficult but I think its very important, it would
 make life _alot_ easier.

 Also could you put ( im not sure what you call this )

 operator char [] () {}

 and the like on the wish list ?


 Lets all ask walter to give us default arguments, rally round the flag!
I'd welcome that, too.
I'll be into it, as long as someone can give a couple of compelling examples. We've not had any yet.
 With even the named arg.
 syntax, it would be fabulous...
Well, I'd like this with or without defaults. We'll also need this in the template parameters, so as to avoid some of the nightmare workarounds in C++.
Nov 24 2003