Re: Inconsistencies in 5.3
| From: | Larry Garfield | Date: | Tue, 05 Aug 2008 03:42:16 +0000 |
| Subject: | Re: Inconsistencies in 5.3 | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-39649@lists.php.net to get a copy of this message | ||
On Monday 04 August 2008 10:29:33 am Andi Gutmans wrote:
> Re: braces, I don't think it's a big deal but I would prefer without
> braces. Given that I think people should only have one namespace per file,
> the braces is a PITA because it already starts you off in an additional
> layer of indentation. We all know that whitespace does matter :) Also
> another reason to not have braces because then it then makes sure that you
> don't go back into a global namespace and it is truly only used in these
> framework concatenation use cases.
There's always
class Foo::Bar { ... }
if you want to avoid too much indentation. :-)
*runs*
Seriously though, the main problem I see with the non-braces mechanism is
that, as others have observed, it is the only place in PHP (AFAIK) where file
matters. All other code can be shuffled about from file to file without
breaking. That's rather inconsistent.
--
Larry Garfield
larry@garfieldtech.com