Linked by Jared White on Thu 24th Apr 2003 17:49 UTC
Permalink for comment
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
News
Linked by Thom Holwerda on 05/21/13 15:53 UTC
Linked by Thom Holwerda on 05/20/13 22:43 UTC
Linked by Thom Holwerda on 05/20/13 21:50 UTC
Linked by Thom Holwerda on 05/19/13 23:15 UTC
Linked by Thom Holwerda on 05/19/13 23:11 UTC, submitted by Drumhellar
Linked by Thom Holwerda on 05/18/13 21:06 UTC
Linked by Thom Holwerda on 05/18/13 7:37 UTC
Linked by fran on 05/18/13 1:38 UTC
Linked by Thom Holwerda on 05/17/13 23:35 UTC, submitted by kragil
Linked by MOS6510 on 05/17/13 22:22 UTC
More News »
Sponsored Links



"As far as naming parameters being easier, not only do you have to remember their order, you also have to remember their name, unless you have a reference for the class you're using, and then the point is moot."
Cocoa methods are named very consistently -- you can often just guess at the method name you want to use w/o consulting the documentation.
The main benefit with named arguments is not in recalling method names, but in reading source code. If you are not familiar with a piece of code (or you are revisiting your own code after a long hiatus), a line like
[shape drawAtXCoord:2 yCoord:7 width:5 height:10 bordered:YES];
is a lot easier to decipher than the more Java-like
shape.draw(2,7,5,10,true);
I wish more languages provided named arguments. The only ones I know of are Smalltalk and Objective-C. Any others out there?