Re: [Fwd: Re: [PHP-DEV] Renaming namespaces to packages]
| From: | Ralph Schindler | Date: | Wed, 15 Aug 2007 19:32:10 +0000 |
| Subject: | Re: [Fwd: Re: [PHP-DEV] Renaming namespaces to packages] | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-31594@lists.php.net to get a copy of this message | ||
Stanislav Malyshev wrote:
My point is simply that there is a different between the concept and someones interpretation of the concept that influences an actual implementation. MVC, although overly used in these web 2.1-rc4 days, is not a product, or even an implementation.. Its a pattern for development and a concept. ZF-MVC is an implementation of this pattern, as is Symfony, as is RoR, as is Django. I use the concept of Namespaces to build a more OO friendly session object for Zend_Session. Which is why we have a class called Zend_Session_Namespace. Point being, its an implementation of the namespace concept within an implementation of a component in the Zend Framework.Wikipedia also define the term MVC. But alas, that is a conceptual definition, not blueprints for implementation.Who cares about the implementation? It's still MVC. So let's implement MVC and call it "distributed enterprise messaging" and then let's spend next 2 years explaining that it was really MVC that we meant.
PACKAGES ARE a namespace implementation with file/directory/and or other filesystem restrictions. I would go out on a limb and say that if you surveyed a large majority of languages and developers, that statement above would fit most peoples perception of "what a package is".namespaces and packages. But the general taste this will leave in peoples mouthes is package, even if it is a Grapple.I am still waiting to know what is package? I know what is namespace - and I for everybody that doesn't know I can explain it in 2 minutes with one hand tied behind my back. But what is "package"?
Its not a point of needing them so badly. The point is what the lack of braces implies within the language itself. Instead of namespace scope ending at a brace, its now ending at the end OF A FILE; hence introducing a FILESYSTEM restriction. Questions: can I run an interactive php shell and define a few namespaces and classes to use in a runtime environment? Say, using, PHP_Shell in pear? Can I have more than one namespace in a single file?current implementation doesn't have braces; this (consequently) adds aOuch, not braces again. What is it with braces that you need them so badly? Many languages aren't using the things ever, isn't it a proof that there's life outside braces? ;)
True, but we are also talking about library components that are regulated by some coding standards, specifically, the one class per file requirement. This itself is not a PHP thing, its a ZF-Coding Standards thing. Using package implies a "one namespaced package per file rule" whereas the simple term of "namespace" does not (at least to me).library "packages". Point in case is how the ZF has used a pesudo-namespace-ing class name to accomplish the very same thing.ZF is using Very_Very_Long_And_Very_Irritating_Class_Names because there's no choice to do otherwise. That's why we wrote namespaces - to provide this choice.
Well, you talked about sending out the press release about "PHP has namespace support!".. and that is pure marketing ;) But I agree with you in that the long term goal is about developer perception, and thats why its important to have this decided. -ralph+1 on package, it makes the most sense regardless of the marketing draw of "namespace" support.Please re-read my mail on perception. "Marketing" here is just a way to say "perception" so it sounds bad to some people for some reason.