• 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: Silly question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Silly question


  • Subject: Re: Silly question
  • From: Lance Bland <email@hidden>
  • Date: Thu, 20 Dec 2001 17:58:27 -0500

On Thursday, December 20, 2001, at 05:15 PM, John C. Randolph wrote:

However, it is considered a bad practice to have multiple returns in a
single function or method.

I disagree with you on this. What I tend to do is something like:

I agree with John. My favorite is this:

- (id)makeMyDay
{

/*
If it is made just return so you don't have to read further.
*/

if(myDay != nil) return myDay;

/*
Sorry bud, but now I have to make it, so read on
*/

// ... 100 lines of init and setup code later ...

return myDay;
}


- lance


_______________________________________________
Lance Bland
System Administrator at VVI
mailto:email@hidden
http://www.vvi.com
Realtime, bulk and web data reporting and visualization


  • Follow-Ups:
    • Re: Silly question
      • From: Ben Hines <email@hidden>
References: 
 >Re: Silly question (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: Re: Archiving objects without their owner[1]
  • Next by Date: Re: (OT) auto-indent a big hit here
  • Previous by thread: Re: Silly question
  • Next by thread: Re: Silly question
  • Index(es):
    • Date
    • Thread