On Dec 11, 2007 6:13 PM, Gregory Beaver <[EMAIL PROTECTED]> wrote:

> The example above shows that imported names are reset at each namespace
> declaration.  There is no prohibition on this code:
>
> <?php
> namespace one; {
> use Blah::A;
> // code
> }
> namespace two; {
> use Foo::A;
> // code
> }
> ?>
>
> Users who wish to use brackets may do so.  The performance penalty
> imposed by using brackets is minor for some cases, and for users who are
> following the recommended practice of 1 namespace per file, the syntax
> is ideal.

My question is that if using the above code already incurs a perf penalty,
then why not just go ahead and include true support for braces in
namespaces. Unless there is an additional penalty that I'm missing, the only
difference between true braces and the above is that the above looks like a
cheap hack (note: the use the of phrase "cheap hack" is in no way meant to
demean the hard work of the people involved with the namespace
implementation, and is the sole opinion of the poster :)).



-- 
It looked like something resembling white marble, which was
probably what it was: something resembling white marble.
               -- Douglas Adams, "The Hitchhikers Guide to the Galaxy"

Reply via email to