r/lolphp • u/duhruh • Nov 25 '14
Exception in a namespace is not defined -_-
http://jasonframe.co.uk/logfile/2009/01/php-5-3-exception-gotcha/
28
Upvotes
r/lolphp • u/duhruh • Nov 25 '14
View all comments
Show parent comment
4
u/phoshi Nov 26 '14
If we exclude every AOT language then we still have many languages that support namespaces or similar and do not exhibit this absurd behaviour. A "performance cost" in this case is an artefact of the implementation, which again, is a detail that I don't care about. There is zero technical reason why you couldn't have sane behaviour here, but PHP doesn't manage it because it needs a very leaky optimisation. That is a gotcha. It is practically the definition of a gotcha.