Stanislav Malyshev wrote:
Precentage of code that lies between throw point and catch point has nothing to do with anything. The structure of the code - that you always know which block encloses the code with exception potential and which code would handle the exception if it arises - has everything to do with it.

one of the things we agreed upon from the very start (if i remember
correctly) was that we are *not* going to have 'calculated' GOTOs,
just constants are allowed as argument to GOTO so that it is perfectly
clear where it jumps to

with exceptions OTOH you can do silly stuff like

  $execptionName = $someObj->getRandomExeceptionName();
  throw new $exceptionName;

now where will that one be caught?

dirty code? indeed ... but then it is perfectly legel,
so lets ban "calculated" exceptions, too, as they obviously
provide the potential for unmaintanable spaghettyish code ;)



--
Hartmut Holzgraefe, Senior Support Engineer                            .
MySQL AB, www.mysql.com

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to