• 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: Programming Style: Method Definition with or without a semicolon.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programming Style: Method Definition with or without a semicolon.


  • Subject: Re: Programming Style: Method Definition with or without a semicolon.
  • From: Graham Cox <email@hidden>
  • Date: Sat, 17 Oct 2009 23:25:24 +1100


On 17/10/2009, at 6:24 PM, Uli Kusterer wrote:

What do project templates have to do with code completion? The comments don't mention how to customize code completion stubs either. Did I overlook something?


I didn't say anything about code completion. I understood the OP to be talking about the stubs inserted when subclassing various classes, though now I read it again I may have got the wrong end of the stick. If that's the case, sorry for the noise - and yes, that does open up a cause for complaint here too.

The code completion for language elements is annoying - I like the code completion for methods (mostly - still not as smart as they could be) but the stupid completions for, e.g. else {...} annoy the hell out of me and seemingly can't be turned off independently. That one's especially grevious because when composing code when I get to an 'else' clause I often pause to collect my thoughts (or maybe have just added a new if() clause above some existing code that becomes the 'else') and in either case get an immediate and incorrectly formatted stub than needs to be backed out using undo before I can continue. The 'return-command-Z-continue typing' is already starting to become part of my motor memory for any 'else' I type. Dumb, dumb, dumb.

The preferences for code completion need to be broken down into what elements completions will be performed for - those that are just language constructions need to be a) disableable and/or b) templateable and for good measure c) much, much smarter about how they fit in with any existing code that surrounds them. The current implementation seems to assume that any code being written is new, virgin code that is being typed into blank space. I would say that that is rarely the case for most coding situations in the real world. And its brace style is just adding insult to injury since it's forcing a brace style that I don't use myself. Code completions should help, not act like some Objective-C grammar Nazi, imposing someone else's idea of good style on my code.

If there is a way to disable these insertions independently and I've missed it, please someone, let me know how to do it.

--Graham


_______________________________________________

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


  • Follow-Ups:
    • Re: Programming Style: Method Definition with or without a semicolon.
      • From: Rob Keniger <email@hidden>
References: 
 >Programming Style: Method Definition with or without a semicolon. (From: "Frederick C. Lee" <email@hidden>)
 >Re: Programming Style: Method Definition with or without a semicolon. (From: Graham Cox <email@hidden>)
 >Re: Programming Style: Method Definition with or without a semicolon. (From: Roland King <email@hidden>)
 >Re: Programming Style: Method Definition with or without a semicolon. (From: Graham Cox <email@hidden>)
 >Re: Programming Style: Method Definition with or without a semicolon. (From: Uli Kusterer <email@hidden>)
 >Re: Programming Style: Method Definition with or without a semicolon. (From: Graham Cox <email@hidden>)
 >Re: Programming Style: Method Definition with or without a semicolon. (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: Triggering a Method when a Core Data Property changes.
  • Next by Date: Re: How to retrieve the font information from TrueType font file?
  • Previous by thread: Re: Programming Style: Method Definition with or without a semicolon.
  • Next by thread: Re: Programming Style: Method Definition with or without a semicolon.
  • Index(es):
    • Date
    • Thread