J
James Dow Allen
On reading the entirety of James's article,
Richard concludes that James has completely failed to
convince Richard that James is an idiot. Would
James care to try again?![]()
Sorry to take so long to get back to you
on this. Often my stupid-seemingest posts
are ones I spend effort preparing, but I've
been busy working on a book. (Nothing to do
with C language, all will be happy to note.)
I thought of replying to one of your posts showing
your gcc command line with
but was afraid that might be judged as simply poorDidn't you forget an option?
-Wwarn_about_excessive_number_of_long-named_warning_options
humor rather than stupidity.
Here's my submission:
Firstly, I would just like to point out that it's rarely
a good idea to use goto (in fact, I've never come across
a good reason to use it in "real" code).
Let me refer Honourable Members to a
reply I gave some years ago in this ng:
http://groups.google.com/group/comp.lang.misc/msg/90274cfe18bb3117?dmode=source
Tim Rentsch posted a "structured alternative" to
my Favorite-Goto Bridge Solving Program. It and
the "unstructured alternative" are shown here:
http://james.fabpedigree.com/gotoalt.htm
I do hope readers will indicate which version
is "more readable."
As noted on the webpage, in order to get rid
of the 'goto' and its associated label, Tim's
version
replaces
* four "natural" for-loops (which work
together smoothly *because* of the goto)
with
* two for_ever loops nested inside a third
for_ever loop, as well as two break's, four
if's, two else's, and four inside-loop state
changing fragments (all required because the
"natural" for-loop headers were expunged
to get rid of goto);
replaces
* a single return at end of function
with
* a single return inside an inner loop;
replaces
* a single initialization
with
* two instances of this same initialization.
(I don't claim that Inside-loop returning or replicated
initialization is a fault of the same magnitude as goto,
just that the need for them in Tim's version suggests
that my version (with goto) better captures the program's
natural structure.)
James Dow Allen