• 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: Good Habits (was: Re: C question for you old guys ;-))
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Good Habits (was: Re: C question for you old guys ;-))


  • Subject: Re: Good Habits (was: Re: C question for you old guys ;-))
  • From: Joe Osborn <email@hidden>
  • Date: Mon, 9 Jun 2003 11:26:58 -0500

On Monday, Jun 9, 2003, at 10:45 US/Central, Oscar Morales Vivs wrote:
What "good habits" does anyone else have?
...
- Use comments in then and else clauses if the condition is not specially trivial. Like:

if(<very complex expression>)
{
// This means Jupiter is in the house of Libra.
...
}
else
{
// Jupiter is not in the house of Libra.
...
}

I would take this a bit farther, if possible.

if([jupiter isInHouseOf:libra])
{

}
...

Or similar. Granted, this may not be possible if there are many parameters involved in the conditional check.

/*
Oscar Morales Vivs

Eternal Computer Science Student. Master of C++ Templates. Cocoa Nut. Computer Graphics Illuminati. UI Guru in Training. Dabbler in all things CS and most which are not.

Web stuff: http://homepage.mac.com/oscarmv/index.html
*/

--joe
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Good Habits (was: Re: C question for you old guys ;-))
      • From: Oscar Morales Vivó <email@hidden>
References: 
 >Re: Good Habits (was: Re: C question for you old guys ;-)) (From: Oscar Morales Vivó <email@hidden>)

  • Prev by Date: Re: Cocoa and Sockets
  • Next by Date: Re: C question for you old guys ;-)
  • Previous by thread: Re: Good Habits (was: Re: C question for you old guys ;-))
  • Next by thread: Re: Good Habits (was: Re: C question for you old guys ;-))
  • Index(es):
    • Date
    • Thread