> >From: Aaron Ardiri
> > goto's have valid reasons for usage,
> > especially with exception handling..
--- Stringer wrote:
> Please, please never ever ever ever use
> 'goto' in a C or C++ programming.
> Have a thousand returns, breaks and
> continues before you ever have a single
> goto.
I don't want to start a religious war, but I have to
side with Aaron on this. Sometimes using a goto makes
the code much cleaner. However, it's very good to
avoid goto when you are learning because it is so
easily misused.
For example, there is absolutely no difference between
(a) if (something) return;
and
(b) if (something) goto end-of-function;
Therefore, it's hard to support the statement that (b)
can "never ever ever ever" be used.
Edsger Dijkstra was just a neophyte programmer when he
wrote the famous paper, "Go To Statement Considered
Harmful," published in the "Communications of the
ACM," Vol. 11, No. 3, March 1968. (See
http://www.acm.org/classics/oct95/ if you're
interested.) In fact, he's not really a programmer at
all; he's a mathematician. (No offense to Paul.)
__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/