Click here to Skip to main content
15,897,187 members

Survey Results

Are optional parameters for methods good or bad?   [Edit]

Survey period: 28 Feb 2005 to 6 Mar 2005

C++ has them, C# doesn't. Overall, what's your preference?

OptionVotes% 
Good84865.48
Bad28722.16
Undecided16012.36



 
GeneralA proposal that (I think) would make everyone happy Pin
Don Clugston6-Mar-05 15:51
Don Clugston6-Mar-05 15:51 
GeneralRe: A proposal that (I think) would make everyone happy Pin
Michael Flanakin10-Mar-05 11:25
Michael Flanakin10-Mar-05 11:25 
GeneralDepends on the language... Pin
Jeremy Falcon6-Mar-05 4:55
professionalJeremy Falcon6-Mar-05 4:55 
GeneralThere should be no parararmeters Pin
Anonymous3-Mar-05 18:00
Anonymous3-Mar-05 18:00 
GeneralDefaults promote bad design Pin
Peter Ritchie3-Mar-05 15:35
Peter Ritchie3-Mar-05 15:35 
GeneralNone is best! Pin
Bob Stanneveld28-Feb-05 20:39
Bob Stanneveld28-Feb-05 20:39 
GeneralRe: None is best! Pin
netclectic28-Feb-05 23:38
netclectic28-Feb-05 23:38 
GeneralRe: None is best! Pin
Nemanja Trifunovic1-Mar-05 2:56
Nemanja Trifunovic1-Mar-05 2:56 
GeneralRe: None is best! Pin
tom_dx1-Mar-05 1:58
tom_dx1-Mar-05 1:58 
GeneralRe: None is best! Pin
Bob Stanneveld1-Mar-05 3:29
Bob Stanneveld1-Mar-05 3:29 
GeneralRe: None is best! Pin
Anonymous3-Mar-05 14:09
Anonymous3-Mar-05 14:09 
GeneralRe: None is best! Pin
tom_dx3-Mar-05 14:10
tom_dx3-Mar-05 14:10 
Generalpowerful feature Pin
Member 129322928-Feb-05 19:20
Member 129322928-Feb-05 19:20 
GeneralAn alternative! Pin
Eddie de Bear28-Feb-05 17:11
Eddie de Bear28-Feb-05 17:11 
GeneralRe: An alternative! Pin
Bob Stanneveld28-Feb-05 20:30
Bob Stanneveld28-Feb-05 20:30 
GeneralI hate them. They foul up generic code. Pin
Don Clugston28-Feb-05 13:40
Don Clugston28-Feb-05 13:40 
* There is no way for a generic function to find out what the default value is, so they can't generally be used in generic code.
* They are the reason for some silly rules, such as you can't take the address of an STL function (hidden default arguments are legal in an STL implementation).

Overloading is easier to understand, and it results in more optimal code. Default arguments have nothing in their favour, as far as I can tell, except that they were easier to implement. They are an annoying relic of a past era. C++0x should abolish them.

Template default arguments are more useful, but even there I would rather get rid of them and replace them with template typedefs.

GeneralDepends Pin
Giancarlo Aguilera28-Feb-05 9:17
Giancarlo Aguilera28-Feb-05 9:17 
GeneralMissing classes in the model Pin
Daniel Turini28-Feb-05 8:17
Daniel Turini28-Feb-05 8:17 
GeneralOverload nitemare Pin
leppie27-Feb-05 19:57
leppie27-Feb-05 19:57 
GeneralRe: Overload nitemare Pin
WillemM27-Feb-05 20:01
WillemM27-Feb-05 20:01 
GeneralRe: Overload nitemare Pin
Corneliu Tusnea27-Feb-05 22:07
Corneliu Tusnea27-Feb-05 22:07 
GeneralRe: Overload nitemare Pin
WoR27-Feb-05 23:36
WoR27-Feb-05 23:36 
GeneralRe: Overload nitemare Pin
paulccc28-Feb-05 0:59
paulccc28-Feb-05 0:59 
GeneralRe: Overload nitemare Pin
Chris Meech28-Feb-05 1:46
Chris Meech28-Feb-05 1:46 
GeneralRe: Overload nitemare Pin
Blake Miller28-Feb-05 5:13
Blake Miller28-Feb-05 5:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.