goto a no-go?

Chris wendlec at tcd.ie
Tue Oct 1 06:10:34 PDT 2013


On Tuesday, 1 October 2013 at 12:13:18 UTC, Dicebot wrote:
> On Tuesday, 1 October 2013 at 11:35:35 UTC, Chris wrote:
>> Thanks, this is what I was looking for, a more elegant 
>> solution. I was going through some old code and saw the odd 
>> goto statement. scope() shows of course that some sort of goto 
>> mechanism is pretty handy (no matter what the textbooks say).
>
> goto is not avoided because of functionality it enables but 
> because of unhygienic way it is implemented. scope guards offer 
> part of that functionality in much more clean and safe way and 
> there is nothing wrong about using them.

That was my point.


More information about the Digitalmars-d mailing list