Chris R Miller wrote:
Andrei Alexandrescu wrote:
Yah, same here. I seem to finally have found one of the elusive cases
when goto simplifies things.

About Brad's variant - ranges don't define clear, but assigning b =
b.init does the trick. (I personally still find the goto version
marginally clearer. It's also marginally more efficient because it
doesn't do one assignment and one vacuous check. Also the joke with the
programmer who throws the water and then applies the known procedure to
make coffee comes to mind.)

Enlighten those of us unfamiliar with this joke?

I found a variant of it on http://www.xs4all.nl/~jcdverha/scijokes/6.html:

There were two men trying to decide what to do for a living.  They
went to see a counselor, and he decided that they had good problem
solving skills.

He tried a test to narrow the area of specialty.  He put each man in a
room with a stove, a table, and a pot of water on the table.  He said
"Boil the water".  Both men moved the pot from the table to the stove
and turned on the burner to boil the water.  Next, he put them into a
room with a stove, a table, and a pot of water on the floor.  Again,
he said "Boil the water".  The first man put the pot on the stove and
turned on the burner.  The counselor told him to be an Engineer,
because he could solve each problem individually.  The second man
moved the pot from the floor to the table, and then moved the pot from
the table to the stove and turned on the burner.  The counselor told
him to be a mathematician because he reduced the problem to a
previously solved problem.


Andrei

Reply via email to