I think the majority of the namespaces stuff is fine. However, having
read the irc discussion about how the namespaces seperator was decided
upon, i don't think there are many people here who can honestly say
that ease of typing is that big of a deal compared to maintainability
and being able to easily read the code.

Both Perl and C++ use :: to success. i don't know how much of an
overlap there is in PHP and Perl or C++ programmers, so I'm not
suggesting it for familiarity reasons, but i have never heard anyone
say "i wish C++/ Perl used a different namespace separator.

Stas: I believe you work for Zend ? Have you tried going through ZF
and namespaced a few of the modules (using \ ) and then the code that
uses it ?

I tried to give it a go today with our framework internally and while
i know the '\' has its merits, the code ( to us at least ) felt more
cluttered. I will continue to use it for a few weeks as I have done
C++ and Perl programming so familiarity might alter my perception.

Where you can use the 'use' statements, i will admit,  its not _that_
bad. If you have alot of overlap with a 3rd parties code base and
'use' doesn't work so well then it becomes very difficult to read. At
least for my simple mind.

I know that you say the majority of people didn't 'care' up until now
but I feel thats untrue. The majority of people (I believe ) simply
thought that namespaces was heading in the right direction. I for one
was in this group although i have been mildly active on the list.

The old style long class names approach of ,

$bar = new Module_Name_Foo_Bar();

imho is more clear than

$bar = new Module\Name\Foo\Bar();

I still struggle to see  how the :: is confusing or difficult to type.
$bar = new Module::Name::Foo::Bar();

Even if this was erroneous with syntax highlighting and the syntax
checker i really don't think its going to cause that much grief ( esp
given Perl / C++ ) have had it for a while.

is the below allowed ?

$bar = new Module \ Foo \ Bar();

I find it easier to read than with out the space.

i know with real namespaces you don't have to call the class Module_Foo_Bar
but i think a few people might be considering sticking with the long
classname approach.

Many of the PHP community as a whole been very supportive of everyone
working on the namespaces implemenation. There are a few vocal people
on this list but the majority I think are quite happy with what was
proposed previously.  God knows we couldn't come up with a better
implementation but it would be nice if you could all remember that we
are using it day in day out as well. You have obviously seen how many
people 'care' now , and my guess is that it's largely because they
think this will have a big impact on their  day to day use of the
language.

Since I haven't offered anything in the way of a solution yet, if i
were to write something that allowed the users to choose which
separator we used would that be considered ? If not, is it possible
that you could ( if its not already) make it trivial to change for
those of us who are willing to apply our own patches each time for our
particular machines.  I don't think forking the project would achieve
much but it would be nice if I could maintain a small patchset which
could be applied to each release. That way those who want it can have
it.

I'm not saying that '\' is a bad decision, They were all good reasons,
I'm simply saying that there are a significant number of users who
place a different priority on the reasons that those who made the
decision.

thank you for your time
Andrew



On Sat, Aug 30, 2008 at 5:30 AM, Stanislav Malyshev <[EMAIL PROTECTED]> wrote:
> Hi!
>
>> Seems like you are answering lot of questions about namespaces lately
>> with "that's not how the model was designed".
>
> Not really, and it's not the reason, the reason why it wasn't designed that
> way was explained before and was explained again.
>
>> Guess it should have been designed in the open to begin with.
>
> It was. Just a lot of people couldn't care less until it is a day before
> feature freeze and then they wake up and want whole thing rewritten from
> scratch, and don't even take time to think about what their changes really
> mean and how it is going to work with all other parts of the language.
> Namespaces is not the only case btw.
> --
> Stanislav Malyshev, Zend Software Architect
> [EMAIL PROTECTED]   http://www.zend.com/
> (408)253-8829   MSN: [EMAIL PROTECTED]
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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

Reply via email to