Re: Inconsistencies in 5.3

From: Date: Tue, 12 Aug 2008 00:21:23 +0000
Subject: Re: Inconsistencies in 5.3
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-39852@lists.php.net to get a copy of this message
Hello, On Tue, Aug 12, 2008 at 2:12 AM, Stanislav Malyshev <stas@zend.com> wrote: > Hi! > >> I fail to see why { } meaning a different level of hierarchy is a >> problem here, that's exactly what it's supposed to mean: "code in that >> block is affected by that namespace." > > Exactly. The thing is that there can be no code that is not affected (at > least not in this file) for namespaces - and {} implies there could be. but if the {} syntax is introduced, it will be made to affect only the code inside it, right? If so, I fail to see your point, since the new syntax will solve that problem. > >> We don't expect if's to work until the next if(), do we? Even though >> ifs are not "entities like classes or functions". > > Exactly. That's why it makes sense to have if() with braces - because if > works not until the end of file, but only with the block attached to it, and > after this block ends, it's like there was no if. But namespace doesn't work > this way. Same as before: but they would work this way with the {} syntax > -- > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com > > -- Etienne Kneuss http://www.colder.ch Men never do evil so completely and cheerfully as when they do it from a religious conviction. -- Pascal

« previous php.internals (#39852) next »