Re: [RFC] Namespace syntax decision
| From: | Johannes Schlüter | Date: | Wed, 26 Mar 2008 23:42:09 +0000 |
| Subject: | Re: [RFC] Namespace syntax decision | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-36592@lists.php.net to get a copy of this message | ||
Hi,
On Fri, 2008-03-21 at 22:36 +0100, Marcus Boerger wrote:
> we all were asked to stop discussing syntax of namespaces as we were told
> that we would decide after the namespace functionality was fully implemented.
> Now I think that the functionallity is pretty much settled we should
> revisit the syntax. We all have been very patient so far. Anyway here goes
> my take on it:
Allowing multiple namespaces per file using the "namespace foo;" syntax
feels really bad for me. Therefore I basically agree with Marcus on the
two options.
> 1) namespace foo { }
>
> 2) package foo;
>
> I favor 1) if we allow namespace nesting and 2) if not. The current
> way of
> nesting is very confusing:
> namespace foo; namespace bar;
About the options I don't have strong opinions but I see that people
want multiple namespaces per file. We aren't like other languages which
enforce one class per file and I don't think we should enforce one
namespace per file. Therefore I prefer 1).
johannes