For some reason,
return statements are outlawed in our shop. The official reason given is that you’d always need a place to “clean up things”, which is not guaranteed when you use return. Personally, I think that’s a bit far-fetched, but whatever.
However, to keep things a bit more readable, something called the “for-bool-loop” has been established. The ingenious snippet works like this:
for(bool bCond = true; bCond; bCond = false)
I personally consider this to be, er, a bit bizarre. In most cases, returns would have been perfectly acceptable instead of this goto in disguise. I’m perfectly happy with returning or breaking (even goto) where it makes sense; but this thing seems somewhat gross.
Anyway, what’s your opinion on this?