Calin said:
I remember someone saying on codeproject.com that goto defeates the purpose of c++
I can't tell why, but i have never really used the goto keyword. It feels indeed somehow wrong to do so.
But recently i did. Only for debugging reasons. Temprorary code.
It worked so well for a problem otherwise cumbersome to handle.
And now i think, it happens pretty often i want to break our of two scopes. Nested loops mostly. Requires an extra check for the outer loop.
With goto i would not need the extra check, and the code would be easier to read as well in those cases.
So i'm no longer sure we should treat goto like the black sheep of the family, which is always here, but isn't welcome.
Maybe the goto keyword deserves more attention, more use.
Yes! Let's be fair… Goto keywords matter! From now on, gotos shall be treated like any other keywords! \:D/