Re: Good Habits (was: Re: C question for you old guys ;-))
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.