Re: GOTO operator

From: Date: Fri, 30 Jul 2004 18:48:14 +0000
Subject: Re: GOTO operator
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-11705@lists.php.net to get a copy of this message
At 21:37 30/07/2004, Todd Ruth wrote:
Something doesn't quite seem right to me about a position that has both of the following assertions: 1) goto should not be available 2) there's already an equivalent of goto available, so goto is not needed (and it's just fine that people use the equivalent) If you really believe "1", shouldn't you be arguing for some sort of a warning if someone uses "2"?
You have a point, but it's not that strong. It's much more difficult to abuse exceptions, both because of their interface which only suits error handling (you'd find it difficult to implement loops with exceptions, for instance), because you have to learn how to use them from docs (you won't be able to guess you way around it like you could with GOTO), and because of the name that doesn't leave any room for mistakes, that it's designed for handling error situations. Zeev

« previous php.internals (#11705) next »