[OT] [sdiy] IN your mind, what is ....

Shokwave shokwave at nb.aibn.com
Wed Feb 4 15:19:23 CET 2004


----- Original Message ----- 
From: "Michael E. Caloroso" <analoguediehard at att.net>

> There is ALWAYS a way around goto statements.  Not a simpler solution,
> but it keeps the pointer stack clean which is a goto cannot do.

I do not understand the problem with the stack. It is a JMP, neh? It's not
across functional boundaries, so there's no need to re-establish some
previous incarnation of registers/muck with the stack...at least, as far as
I know. Am I wrong?

As far as the code goes; nested continues are far less clear than a simple
goto-label pair, and not only is the goto clearer but more efficient as
well! (no extra evaluation in each if statement). Win-win, right?

I am personally very careful with my use of continue's. I use break
constantly, but continue almost never. I find continue's impair my ability
to scan the code quickly, which is a danger sign for me. Maybe I've just
seen them used for the wrong reasons...like many people's fear of goto's
hehehehe.

> I design code to run 24/7.  goto statements are forbidden in my work.

I guess they don't trust your ability as a programmer.

Seriously, I almost never use a goto, but I treat it's use exactly like a
continue. I make my decision based on clarity, safety and speed of
execution; depending on where I am in the code I decide how much weight to
give to each of those. Working on performance-oriented entertainment SW does
give one a certian approach to programming that may not work for other
environments.

-Darren



More information about the Synth-diy mailing list