Andre Garzia wrote:
I tend to work on the same way. longer forms makes shorter understanding
time. I'd rather write more and understand more than write faster and then
one week from now, be completely lost in nested mazes
Well said.
And sometimes lengthy deeply-nested IFs are good candidates for a switch
block.
I once stumbled across two tips about code style that have been very
helpful:
1. If a given function has nested IFs more than three levels deep, it
may be a good candidate for breaking it up into smaller functions.
2. If a function is longer than can be viewed in one screen, it may be a
good candidate for breaking it up into smaller functions.
Sometimes those can't be applied for sound practical reasons, but where
they can oh boy does it make code more readable.
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
LiveCode Journal blog: http://LiveCodejournal.com/blog.irv
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode