[EMAIL PROTECTED] escreveu:
On 11/08/2008, Stanislav Malyshev <[EMAIL PROTECTED]> wrote:
Hi!

Ideally someone would summarize the discussion (or maybe two people, one
from each "camp") and then we can have a vote. Make it an RFC or
OK, here it goes again:

When we adopt some syntax, especially syntax matching some other
language, we do not just introduce an otherwise meaningless sequence of
symbols to be learned by users. We introduce concepts, and we create
associative links with other languages. So, if we introduced the syntax
for namespaces that is used by C++ - i.e. braces, we would imply that it
has all the properties that C++ one has and that we encourage the usage
patterns that C++ users adopt. Namely, that namespaces can be nested,
that they are hierarchical, that namespaces can be used in any place in
the file, just for one function/class or even variable without any
influence on the surroundings, that using multiple namespaces in the
same file, along with global space, is completely OK.

So why the $%#$%& can't we use "package" if the implementation has
nothing incommon with namespaces in c++ (your example, not mine)?


Added to that, braced namespaces would imply additional (and
unnecessary) level of hierarchy and indentation for most editors and
code formatters.
[snip]
With all that, there's not one thing that syntax with {} enables us to
do and that is not possible to do right now (and that we want to do :).

Well. I do want that indentation if I ever will be dumb enough to have
multiple namespace in the same file..

There is only one thing I could care less about than consistency, and
that is Windows.
Its not about consistency for me. Its about that little gut feeling you have.
To me it looks, and feels, much more like a namespace when you wrap it
in a namespace block. To me its more natural syntax.


-Hannes

IMHO it doesn't make sense to have {} around namespaces if PHP recommends (imposes?) 1 namespace per file. I personally prefer the more C++-like way, described by Stanislav, where you can do pretty much anything namespace-wise. But if PHP is sticking to the prior, { } just looks wrong to me.

--
Rodrigo Saboya

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to