• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Amount of Arguments per Method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Amount of Arguments per Method (From: Chunk 1978 <email@hidden>)
 >Re: Amount of Arguments per Method (From: WT <email@hidden>)
 >Re: Amount of Arguments per Method (From: Roland King <email@hidden>)
 >Re: Amount of Arguments per Method (From: Andy Lee <email@hidden>)
 >Re: Amount of Arguments per Method (From: WT <email@hidden>)
 >Re: Amount of Arguments per Method (From: Paul M <email@hidden>)
 >Re: Amount of Arguments per Method (From: Michael Ash <email@hidden>)
 >Re: Amount of Arguments per Method (From: WT <email@hidden>)

  • Prev by Date: Re: Opinion on managed memory and garbage collection
  • Next by Date: Re: Beginner Question Re: Memory Management
  • Previous by thread: Re: Amount of Arguments per Method
  • Next by thread: Re: Amount of Arguments per Method
  • Index(es):
    • Date
    • Thread