J
James Kanze
Fine. Look at it one year from now and figure out what it's supposed to
do. Especially if there's a bug related to it.
I'm with you on this one. Since the OP did mention "elegance",
comments about it are certainly on topic. But more generally,
if someone is adopting a bad approach, pointing this out to them
is generally more useful than finding a way to make the bad
approach work.
And of course, if the OP wants to be, and remain, gainfully
employed... Such code violates the coding guidelines of every
company I've worked in in the last 15 years or so, and people
who violate the coding guidelines aren't allowed to work on
code. (In the US, I imagine that they would be fired, but in
Europe, firing someone is a bit more difficult. On the other
hand, in general, "Ve haf vays to make you quit".)
Oh, and personal attacks like that really make me want to pay attention
to what you say.
Personal attacks are what one uses when one has no legitimate
arguments.
After 20 years of developing, debugging and
maintaining C and C++, I would loudly proclaim (and have done so -- in
the presence of said author) that the anyone who put code like that into
production should be shot.
I'm against capital punishment, but otherwise, I agree.