However you don't have a semicolon after your namespace declaration.
With the current implementation you would need a semicolon, which
doesn't look nearly as good with braces.
On Fri, 2007-12-07 at 15:21 -0500, Ken Stanley wrote:
> I understand what you mean, but I was just trying to put a real-world face
> on a so-far theoretical problem. But that does raise an interesting point;
> we can already use braces anywhere and everywhere, and while we could easily
> wrap namespaces in anonymous braces like you describe, why not just go the
> extra mile and allow attaching them directly to the namespace, i.e.:
>
> <?php
>
> namespace XYZ {
> // Do stuff
> }
>
> // Looks a little better than
>
> {
> namespace XYZ;
>
> // Do stuff
>
> }
>
> ?>
>
> Of course, this is just my opinion, and given your suggestion, at least
> there is an acceptable solution already. Thank you. :)
>
> On Dec 7, 2007 3:10 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:
>
> > Is there any reason why you can't already use braces optionally? I mean,
> > the following code is valid with the current engine:
> >
> > <?php
> >
> > {
> > {
> > {
> > class Foo
> > {
> > function Foo()
> > {
> > echo 'Foo'."\n";
> > }
> > }
> > }
> > }
> > }
> >
> > ?>
> >
> > Cheers,
> > Rob.
> > --
> > ...........................................................
> > SwarmBuy.com - http://www.swarmbuy.com
> >
> > Leveraging the buying power of the masses!
> > ...........................................................
> >
>
>
>
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php