Re: Amount of Arguments per Method
Re: Amount of Arguments per Method
- Subject: Re: Amount of Arguments per Method
- From: Bill Bumgarner <email@hidden>
- Date: Mon, 22 Jun 2009 23:56:37 -0500
Meh. I'd much rather see calls to methods that take many arguments
broken up across a number of lines for three reasons (drawing the line
at methods that take 4 or more arguments, for me):
(0) I can scan any given line of the method invocation sub-expression
and know that the aligned colons mean "method name fragment on left,
argument on right". Reading the method name becomes a simple
vertical scan. Reading the arguments becomes "scan left o' colon for
context, right o' colon for value".
(1) If any argument isn't a simple variable or constant, breaking it
up by line makes reading the expression easier.
(2) Knowing the exact extent of the method invocation expression is as
simple as double-clicking the opening or closing bracket. (Or you can
ctrl-d then ] on the closing bracket to have the opening bracket
highlighted, if so configured).
I find the whole cram-the-whole-expression-on-one-line notion to be
utterly bizarre and painful to read. Code isn't a novel and we aren't
writing paragraphs.
Code is a highly structured sequence of expressions and our tools are
optimized to navigating, editing and compiling said structured code.
b.bum
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden