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

Shokwave shokwave at nb.aibn.com
Wed Feb 4 03:20:39 CET 2004


----- Original Message ----- 
From: "Magnus Danielson" <cfmd at bredband.net>

> So, when I am seeking to
> find out what I need to know in order to become a good C++ programmer (and
BTW
> I know a number of things in C++ which I can give very good reasons for
NOT to
> use at all or very restrictive). I tend to work kind of OO-oriented in C
> instead.

This reminds me of goto's in C. I make a point of showing my students some
of my code that contains a line like:

if(stuff_happened) goto error;

...nestled at the center of a deeply nested loop. They always look at each
other, and gingerly one will raise a hand and say "but other instructors
told us to never use a goto", and I grin peacefully like Buddha and say
"Yes, *you* shouldn't...unless you know you should. Try and write that code
without one, and show me a CLEARER way to do it. If a goto doesn't make the
code CLEARER, do not use one." I only ever get one or two students who ever
use a goto after that...but I'd get none unless I *did*, and the one or two
that ever uses a single one knows damn sure why they did it, because they
made sure they grokked why *I* used one first.

-Darren



More information about the Synth-diy mailing list