I am not the one that want to put more fire in this entire
discussion... I'm tired of listening (this is like package or like
namespace or because my students like it or even that PHP has a unique
implementation).

I've read all comments and I think I can give my 2 cents.

Instead of keep talking about namespace or package, enlist feature
that both have to deal and how PHP solve it. The PHP behaves more like
package or namespace in this feature? Count all the winners and the
major is the result that everybody is expecting.

Let me point examples...

Subject: File Struture
Comments:
Namespace do not restrict directories (AFAIK)
Packages restrict directories (each package have a directory with its
name, like Zend/Cache/File.php)

Question: What is the behavior of PHP in this situation?
PHP restricts the directory, just like packages. So,
Zend/Cache/File.php is the package Zend::Cache and has the class named
File

Winner: package


Multiple namespaces/packages in one file:
....



Make a list, define how PHP deals with any situation and the count
winner is the answer for the so discussed question.


Regards,

On 8/14/07, Marcus Boerger <[EMAIL PROTECTED]> wrote:
> Hello Stanislav,
>
>   JS has not much in common with PHP so it shouldn't be used as just another
> language to steal ideas from. Actually we are speaking of an OO feature here
> and when it comes to that than the two are very different. PHP on the one
> hand uses class based OO (like C++ and Java) while JS uses prototype based
> OO. And anyway, are we struggling to find excuses here? Can we in no way
> ever at least try to be consistent in anything we do? That JS argument is an
> extremly bad far fetched argument.
>
> marcus
>
> Saturday, August 11, 2007, 9:57:37 PM, you wrote:
>
>
> > -------- Original Message --------
> > Subject: Re: [PHP-DEV] Renaming namespaces to packages
> > Date: Fri, 10 Aug 2007 10:03:25 -0700
> > From: Stanislav Malyshev <[EMAIL PROTECTED]>
> > Organization: Zend Technologies
> > To: Keryx Web <[EMAIL PROTECTED]>
> > References: <[EMAIL PROTECTED]>
> > <[EMAIL PROTECTED]>
> > <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
>
> >> FWIW. I teach PHP and for most students I believe their other
> >> implementation of namespaces will soon be the one in ECMAScript
> >> 4/JavaScript 2.
>
> > Thanks for mentioning it! From what I can see, their idea of namespaces
> > is radically different from what C++ is doing and equally different from
> > what packages are anywhere. They basically introduce an orthogonal
> > namespacing plane (or we can call it attribute set that can be applied
> > to any name) which can be operated independently of the main namespace.
> > It's interesting and can be a powerful tool but I imaging how
> > mind-boggling would be the code seriously using that capability.
>
> > And they, btw, are not ashamed of calling it namespaces just because
> > it's not c++
>
> >>  From what I gather it looks a lot like this one for PHP, and packages
> >> in JS 2 is something more different.
> >> http://developer.mozilla.org/presentations/xtech2006/javascript/
>
> > The packages there, however, seem very much like Java ones with addition
> > of braces.
>
> > P.S. I see you didn't send that to the list - will it be OK to forward
> > it and my response there? I think it's interesting contribution to the
> > discussion.
> > --
> > Stanislav Malyshev, Zend Software Architect
> > [EMAIL PROTECTED]   http://www.zend.com/
> > (408)253-8829   MSN: [EMAIL PROTECTED]
>
>
> > --
> > Stanislav Malyshev, Zend Software Architect
> > [EMAIL PROTECTED]   http://www.zend.com/
> > (408)253-8829   MSN: [EMAIL PROTECTED]
>
>
>
>
> Best regards,
>  Marcus
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9166-6902
MSN: [EMAIL PROTECTED]
URL: http://blog.bisna.com
São Carlos - SP/Brazil

Reply via email to