Re: [Fwd: Re: [PHP-DEV] Renaming namespaces to packages]

From: Date: Wed, 15 Aug 2007 17:29:24 +0000
Subject: Re: [Fwd: Re: [PHP-DEV] Renaming namespaces to packages]
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-31586@lists.php.net to get a copy of this message
It's not about the popularity of a word, but the meaning of it. If it resembles more of a package, let's call it package (as it does
Could you give definition of what is a package, so we could see if it resembles more of a package or less?
currently, namespace should be nested.. but that's my opinion).
Namespace is a mechanism to create separate contexts ("spaces") in which same names could co-exist without being confused with each other. Nothing says it should be hierarchical or have any specific properties like that. BTW, if you read about Java, even though the keyword used in Java is "package", the functionality is often called "namespace". Quoting Wikipedia again: "In the Java programming language, the idea of a namespace is embodied in Java packages." and "Unlike C++, namespaces in Java are not hierarchical". This is understandable - saying "package" does not invoke any specific concept, while "namespace" does. If we tell "PHP now has packages" it can mean anything. If we say "PHP now has namespaces" virtually everybody would instantly understand what we talk about. We could, of course, say "PHP now has namespaces which are called packages" - but wouldn't it sound, well, weird? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#31586) next »