Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31594 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57875 invoked by uid 1010); 15 Aug 2007 19:38:59 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 57860 invoked from network); 15 Aug 2007 19:38:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Aug 2007 19:38:58 -0000 Authentication-Results: pb1.pair.com header.from=ralph@smashlabs.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ralph@smashlabs.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain smashlabs.com from 67.15.58.61 cause and error) X-PHP-List-Original-Sender: ralph@smashlabs.com X-Host-Fingerprint: 67.15.58.61 openrce.org Received: from [67.15.58.61] ([67.15.58.61:58276] helo=SMASHER.SMASHlabs.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BA/00-57311-15653C64 for ; Wed, 15 Aug 2007 15:38:58 -0400 Received: (qmail 3183 invoked from network); 15 Aug 2007 14:32:14 -0500 Received: from localhost (HELO ?127.0.0.1?) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 15 Aug 2007 14:32:14 -0500 Message-ID: <46C354BA.6040604@smashlabs.com> Date: Wed, 15 Aug 2007 14:32:10 -0500 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666 MIME-Version: 1.0 To: Stanislav Malyshev CC: Guilherme Blanco , PHP Internals References: <46BE14B1.5050209@zend.com> <101178402.20070814174515@marcus-boerger.de> <6094eac50708150709o6d1fe42bx3449af2bc1b7f54d@mail.gmail.com> <46C337F4.5080001@zend.com> <46C340D1.3070700@zend.com> <46C346D1.7090203@smashlabs.com> <46C34E11.1020109@zend.com> In-Reply-To: <46C34E11.1020109@zend.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Fwd: Re: [PHP-DEV] Renaming namespaces to packages] From: ralph@smashlabs.com (Ralph Schindler) Stanislav Malyshev wrote: >> 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. 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. >> 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"? 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". >> current implementation doesn't have braces; this (consequently) adds a > > Ouch, 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? ;) 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? >> 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. 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). >> +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. 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