Renaming namespaces to packages

php.internals

Johannes Schlueter

19 years ago
Hi, I think we reached the consensus to rename namespaces to packages as our implementation is more package-like. Therefore I wrote the corresponding patch which tries to get rid of all "namespaces" and "ns" (well, not all "ns" only the namespace-related ones of course) used in the code. Additionally I changed all package-tests. Any objections? Does anybody (with the move-on-CVS-server powers) care about the history of the tests? Then please cp ZendEngine2/tests/ns_* to pkg_* there else I'll do a simple cvs rm and cvs add. The patch is at http://schlueters.de/~johannes/php/zend_namespace_to_package.diff and the tarball with the changed tests at http://schlueters.de/~johannes/php/zend_package_tests.tar.bz2 johannes

Marcus Börger

19 years ago
Hello Johannes, thanks for the work, this even fixes the WS issues introduced by the orgininal patch. marcus Friday, August 10, 2007, 11:26:32 AM, you wrote:
> Hi,
> I think we reached the consensus to rename namespaces to packages as our > implementation is more package-like. Therefore I wrote the corresponding > patch which tries to get rid of all "namespaces" and "ns" (well, not all > "ns" only the namespace-related ones of course) used in the code. > Additionally I changed all package-tests. Any objections?
All fine.
> Does anybody (with the move-on-CVS-server powers) care about the history > of the tests? Then please cp ZendEngine2/tests/ns_* to pkg_* there else > I'll do a simple cvs rm and cvs add.
I do not think that history is necessary for three week old files.
> The patch is at > http://schlueters.de/~johannes/php/zend_namespace_to_package.diff and > the tarball with the changed tests at > http://schlueters.de/~johannes/php/zend_package_tests.tar.bz2
> johannes
Best regards, Marcus

Dmitry Stogov

19 years ago
Please don't commit it. We didn't come to conclusion, what name is better 'namespace', 'package', 'packet' ... Thanks. Dmitry.
> -----Original Message----- > From: Johannes Schlьter [mailto:johannes@php.net] > Sent: Friday, August 10, 2007 1:27 PM > To: PHP Internals List > Cc: Dmitry Stogov > Subject: [PHP-DEV] Renaming namespaces to packages > > > Hi, > > I think we reached the consensus to rename namespaces to > packages as our implementation is more package-like. > Therefore I wrote the corresponding patch which tries to get > rid of all "namespaces" and "ns" (well, not all "ns" only the > namespace-related ones of course) used in the code. > Additionally I changed all package-tests. Any objections? > > Does anybody (with the move-on-CVS-server powers) care about > the history of the tests? Then please cp > ZendEngine2/tests/ns_* to pkg_* there else I'll do a simple > cvs rm and cvs add. > > The patch is at > http://schlueters.de/~johannes/php/zend_namespace_to_package.d
iff and the tarball with the changed tests at http://schlueters.de/~johannes/php/zend_package_tests.tar.bz2 johannes
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Derick Rethans

19 years ago
On Fri, 10 Aug 2007, Dmitry Stogov wrote:
> Please don't commit it. > We didn't come to conclusion, what name is better 'namespace', 'package', > 'packet' ...
Well, our implementation is not namespaces, "packet" doesn't have any meaning in this case, so perhaps you have a better suggestion than "package" then? regards, Derick

Christian Schneider

19 years ago
Derick Rethans wrote:
> Well, our implementation is not namespaces, "packet" doesn't have any > meaning in this case, so perhaps you have a better suggestion than > "package" then?
Just a quick reminder to everybody here: The feature is important, the name (package or namespace) is less so. Even if you don't like one name or the other please don't hinder the integration of this feature into PHP. See http://en.wikipedia.org/wiki/Color_of_the_bikeshed for more info ;-) Cheers, - Chris

Derick Rethans

19 years ago
On Fri, 10 Aug 2007, Christian Schneider wrote:
> Derick Rethans wrote: > > Well, our implementation is not namespaces, "packet" doesn't have any > > meaning in this case, so perhaps you have a better suggestion than > > "package" then? > > Just a quick reminder to everybody here: The feature is important, the > name (package or namespace) is less so.
Incorrect, a name for a feature should show what kind of functionality we implemented. Picking names just for marketing reasons "Oh see, PHP has namespaces" is a bad idea. Derick

Stanislav Malyshev

19 years ago
> Incorrect, a name for a feature should show what kind of > functionality we implemented. Picking names just for marketing reasons > "Oh see, PHP has namespaces" is a bad idea.
I, on the contrary, think it is a good idea to consider perception. Perception is important, especially for low-barrier language like PHP. For a language that requires PhD to program in it you can call anything by any name - PhDs would figure that out. But for language like PHP I think we should make it as perceptually comfortable as we can. My perception is that when people talk about "namespaces" they usually mean logical separation of things in, well, naming space, and when they talk "packages" they usually mean files on disk and putting things into files and finding which thing is in which file. Our implementation is much more former than the later. Of course, my perception is mine, and everybody is entitled to have their own ones, but I would very much like to hear an argument which is not a Siamese twin of "because C++ namespaces have braces and PHP ones don't". If that would be the only reason, I don't think it is a good one. If there are more reasons - I would very much like to hear it before we rush forward and commit things that would influence PHP for next 10 years.
-- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

Marc Gear

19 years ago
On 8/10/07, Stanislav Malyshev <stas@zend.com> wrote:
> I, on the contrary, think it is a good idea to consider perception. > Perception is important, especially for low-barrier language like PHP. > ... > My perception is that when people talk about "namespaces" they usually > mean logical separation of things in, well, naming space, and when they > talk "packages" they usually mean files on disk and putting things into > files and finding which thing is in which file.
You're absolutly right. +1 here for 'namespaces' (for what its worth as a firstpost on internals)
-- Marc Gear marcgear@gmail.com

Cristian Rodriguez

19 years ago
On 8/10/07, Marc Gear <marcgear@gmail.com> wrote:
> You're absolutly right. >
Except for a little thing, those are not namespaces, but something more similar to packages.

Robert Cummings

19 years ago
On Fri, 2007-08-10 at 16:38 -0400, Cristian Rodriguez wrote:
> On 8/10/07, Marc Gear <marcgear@gmail.com> wrote: > > > You're absolutly right. > > > > Except for a little thing, those are not namespaces, but something > more similar to packages.
namages? packspaces? tomayto? tomahto? *teehee* Cheers, Rob.
-- ........................................................... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ...........................................................

Stanislav Malyshev

19 years ago
> Except for a little thing, those are not namespaces, but something > more similar to packages.
What is "namespaces"? Here's wikipedia: A namespace is a context in which a group of one or more identifiers might exist. An identifier defined in a namespace is associated with that namespace. The same identifier can be independently defined in multiple namespaces, that is, the meaning associated with an identifier defined in one namespace is independent of the same identifier declared in any other namespace. Languages that support namespaces specify the rules that determine which namespace an occurrence of an identifier (ie, not its definition) belongs to. http://en.wikipedia.org/wiki/Namespace_%28computer_science%29 So why those are not namespaces?
-- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

Ralph Schindler

19 years ago
After all that has been said and done since this post: http://marc.info/?l=php-dev&m=118355320225178&w=2 Is it safe to say that this functionality laid out is still representative of what is involved in the "namespace" patch? Or, is there a wiki / proposal page somewhere that would better exemplify what is attempting to be accomplished? -ralph Stanislav Malyshev wrote:

Tijnema !

19 years ago
On 8/10/07, Cristian Rodriguez <judas.iscariote@gmail.com> wrote:
> On 8/10/07, Marc Gear <marcgear@gmail.com> wrote: > > > You're absolutly right. > > > > Except for a little thing, those are not namespaces, but something > more similar to packages. >
Well, if those are not namespaces, not packages, call it something else? classgroups? phpspaces? codebundles? ...? Tijnema
-- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

Larry Garfield

19 years ago
On Friday 10 August 2007, Stanislav Malyshev wrote:
> > Incorrect, a name for a feature should show what kind of > > functionality we implemented. Picking names just for marketing reasons > > "Oh see, PHP has namespaces" is a bad idea. > > I, on the contrary, think it is a good idea to consider perception. > Perception is important, especially for low-barrier language like PHP. > For a language that requires PhD to program in it you can call anything > by any name - PhDs would figure that out. But for language like PHP I > think we should make it as perceptually comfortable as we can. > > My perception is that when people talk about "namespaces" they usually > mean logical separation of things in, well, naming space, and when they > talk "packages" they usually mean files on disk and putting things into > files and finding which thing is in which file. Our implementation is > much more former than the later. Of course, my perception is mine, and > everybody is entitled to have their own ones, but I would very much like > to hear an argument which is not a Siamese twin of "because C++ > namespaces have braces and PHP ones don't". If that would be the only > reason, I don't think it is a good one. If there are more reasons - I > would very much like to hear it before we rush forward and commit things > that would influence PHP for next 10 years.
FWIW, the implementation that was committed feels closest to Java, which calls them packages. The next closest parallel feels like it would be XML, where they're called namespaces. I don't know from C#, so can't say how they map there, and never got far enough in C++ to use namespaces there. I'm OK with either name, really. "Namespace" sounds more like what people are asking for in general (rightly or wrongly), and is how I'd probably end up using them, but I can work with either.
-- Larry Garfield AIM: LOLG42 larry@garfieldtech.com ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson

Richard Quadling

19 years ago
On 10/08/07, Stanislav Malyshev <stas@zend.com> wrote:
> My perception is that when people talk about "namespaces" they usually > mean logical separation of things in, well, naming space, and when they > talk "packages" they usually mean files on disk and putting things into > files and finding which thing is in which file. Our implementation is > much more former than the later. Of course, my perception is mine, and > everybody is entitled to have their own ones, but I would very much like > to hear an argument which is not a Siamese twin of "because C++ > namespaces have braces and PHP ones don't". If that would be the only > reason, I don't think it is a good one. If there are more reasons - I > would very much like to hear it before we rush forward and commit things > that would influence PHP for next 10 years.
I don't use C#/C++, but that is what I understand a namespace to be. We hear issues about "polluting the global namespace", as I understand it, this is having too many things which are global and this can lead to other libraries or packages having conflicting names when they are introduced. So by having other namespaces, we can group related entities (classes, functions, variables). External to the namespace, everything within it has a prefix. Ideally the namespace will be unique (not 100% but the namespace is only required for external code to access the content of the namespace, so, in theory, a single line of code is required to be altered to use a different namespace (I think). Internally, the namespace is not required (I think). A package is something completely different. It may be a library of code (or several libraries) or an application or something else entirely. It may or may not implement a namespace (or even have multiple namespaces). A newbie coming across PEAR for the first time will see the word "packages" and I would suggest that trying to separate the meanings of the word "packages" at this stage would require more than normal newbie enthusiasm. I would say a namespace is a programmers thing, whereas a package is more of a distribution thing. You code using namespaces to preserve your classes/functions/variables from global namespace pollution. When it comes to release the code, you would have a package which could indicate dependencies on other packages (like PEAR with its dependency support for example). So, for what it is worth, namespaces should be called namespaces. Richard.
-- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"

Jani Taskinen

19 years ago
On Fri, 2007-08-10 at 14:35 +0200, Christian Schneider wrote:
> Derick Rethans wrote: > > Well, our implementation is not namespaces, "packet" doesn't have any > > meaning in this case, so perhaps you have a better suggestion than > > "package" then? > > Just a quick reminder to everybody here: The feature is important, the > name (package or namespace) is less so. Even if you don't like one name > or the other please don't hinder the integration of this feature into PHP.
"package" is also shorter than "namespace". Just commit the stuff, it's pointless to argue about it. Majority rules. --Jani

David Coallier

19 years ago
On 8/10/07, Jani Taskinen <jani.taskinen@sci.fi> wrote:
> On Fri, 2007-08-10 at 14:35 +0200, Christian Schneider wrote: > > Derick Rethans wrote: > > > Well, our implementation is not namespaces, "packet" doesn't have any > > > meaning in this case, so perhaps you have a better suggestion than > > > "package" then? > > > > Just a quick reminder to everybody here: The feature is important, the > > name (package or namespace) is less so. Even if you don't like one name > > or the other please don't hinder the integration of this feature into PHP. > > "package" is also shorter than "namespace". Just commit the stuff, it's > pointless to argue about it. Majority rules. > > --Jani > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >
Kudos
-- David Coallier, Founder & Software Architect, Agora Production (http://agoraproduction.com) 51.42.06.70.18

Stanislav Malyshev

19 years ago
> "package" is also shorter than "namespace". Just commit the stuff, it's > pointless to argue about it. Majority rules.
Did we ever have a vote? Or it's one man with courage makes a majority? ;)
-- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

Pierre Joye

19 years ago
On 8/10/07, Stanislav Malyshev <stas@zend.com> wrote:
> > "package" is also shorter than "namespace". Just commit the stuff, it's > > pointless to argue about it. Majority rules. > > Did we ever have a vote? Or it's one man with courage makes a majority? ;)
The later seems to be more true than any vote we had until now</unicodeflag> --Pierre

l0t3k

19 years ago
"Jani Taskinen" <jani.taskinen@sci.fi> wrote in message news:1186751822.27264.1.camel@localhost.localdomain...
> "package" is also shorter than "namespace". Just commit the stuff, it's > pointless to argue about it. Majority rules.
and it makes for great alliteration can you say "Peter picked a Pack of Pecl PHP Packages" ;-)

Stanislav Malyshev

19 years ago
> Well, our implementation is not namespaces, "packet" doesn't have any
Where I can see definition of what is "namespaces" and what is not? I can live with "packages", though I like this name less - but what I don't really understand is why anything that doesn't work like c++ namespaces can't now be named "namespaces" - do they have a trademark on it or what?
-- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

Jeremy Privett

19 years ago
Hey Stanislav, I think the issue is that of confusion. When I first heard PHP6 was going to have namespaces, I was expecting namespaces like C++ or C#. What was actually provided was confusing, at first, because it didn't behave like "namespaces" in other languages that I've used. Personally, I don't care what the name is, as long as the feature is implemented. But, coming from a background in C++ and C#, I do believe that the "namespaces" name is a bit misleading. Calling the implementation "packages" would make more logical sense. All that matters now is that it gets implemented, really. My two cents. Thanks. --- Jeremy Privett Software Developer Zend Certified Engineer Peak8 Solutions -----Original Message----- From: Stanislav Malyshev [mailto:stas@zend.com] Sent: Friday, August 10, 2007 10:30 AM To: Derick Rethans Cc: Dmitry Stogov; 'Johannes Schlьter'; 'PHP Internals List' Subject: Re: [PHP-DEV] Renaming namespaces to packages
> Well, our implementation is not namespaces, "packet" doesn't have any
Where I can see definition of what is "namespaces" and what is not? I can live with "packages", though I like this name less - but what I don't really understand is why anything that doesn't work like c++ namespaces can't now be named "namespaces" - do they have a trademark on it or what?
-- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Marcus Börger

19 years ago
Hello Dmitry, i actually only saw pros on the question. And the only remote nay i spotted during my original complaint was that there might be languages noone knows where packages are named namespaces as well. In general we so far always explained or compared PHP features with/against Java and or C++. And using those two we are definitively going with the Java package approach. So unless you have any real argument to increase confusion in PHP again this patch should go in. marcus Friday, August 10, 2007, 2:00:06 PM, you wrote:
> Please don't commit it. > We didn't come to conclusion, what name is better 'namespace', 'package', > 'packet' ...
> Thanks. Dmitry.
>> -----Original Message----- >> From: Johannes Schlьter [mailto:johannes@php.net] >> Sent: Friday, August 10, 2007 1:27 PM >> To: PHP Internals List >> Cc: Dmitry Stogov >> Subject: [PHP-DEV] Renaming namespaces to packages >> >> >> Hi, >> >> I think we reached the consensus to rename namespaces to >> packages as our implementation is more package-like. >> Therefore I wrote the corresponding patch which tries to get >> rid of all "namespaces" and "ns" (well, not all "ns" only the >> namespace-related ones of course) used in the code. >> Additionally I changed all package-tests. Any objections? >> >> Does anybody (with the move-on-CVS-server powers) care about >> the history of the tests? Then please cp >> ZendEngine2/tests/ns_* to pkg_* there else I'll do a simple >> cvs rm and cvs add. >> >> The patch is at >> http://schlueters.de/~johannes/php/zend_namespace_to_package.d > iff and the tarball with the changed tests at > http://schlueters.de/~johannes/php/zend_package_tests.tar.bz2
> johannes
> -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php
Best regards, Marcus

Dmitry Stogov

19 years ago
I have no serious objections about renaming. I am asking to wait a bit. Dmitry.

Derick Rethans

19 years ago
On Fri, 10 Aug 2007, Dmitry Stogov wrote:
> I have no serious objections about renaming. I am asking to wait a bit.
If you think "package" is fine, why wait with renaming it? regards, Derick
-- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

Stanislav Malyshev

19 years ago
>> I have no serious objections about renaming. I am asking to wait a bit. > > If you think "package" is fine, why wait with renaming it?
Because there are others that don't think name "package" is better?
-- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

Dmitry Stogov

19 years ago
At least, I have one additional namespace related patch, that is not accepted yet. Renaming may require a lot of additional work with it. Also, I am not sure that allbody agree with "package". Thanks. Dmitry.

Johannes Schlueter

19 years ago
Hi, On Thu, 2007-08-16 at 09:33 +0400, Dmitry Stogov wrote:
> At least, I have one additional namespace related patch, that is not > accepted yet. > > Renaming may require a lot of additional work with it.
Well, in my experience it's simpler to do such renaming inside an patch (then it's a simple sed command) than after committing it to the tree where you have to make sure not to accidentally rename other, unrelated, stuff, too. That's the reason why I tried to do the renaming asap.
> Also, I am not sure that allbody agree with "package".
I didn't read all mails in that thread but from what I saw only Stanislaw was against renaming it. I for myself don't care really much about the name, but I tend to follow Marcus's argumentation[1] for "package", it tastes a bit better for me. What I would like is a soonish decision so we can advertise that feature and get people testing it and playing with it without having to fear that their (test-)code breaks the next day. (I didn't say it won't brake the next day then, but it's good to give less excuses for not testing that stuff. This testing would also include mysqlnd, unicode and whatever else we have in HEAD right now) johannes [1] http://news.php.net/php.internals/31328

Dmitry Stogov

19 years ago
Hi, We are still working on namespace concept and its features. I am not sure that existing concept will work well as is. So please, don't make us additional troubles. The name is important but it may be changed later, first look into concept itself. Do you completely satisfied with it? Have you tried to use it in real life applications or frameworks? Have you measured slowdown? Do you see holes in concept? These questions are more important then the name... BTW: I personally would accept 'package' for current implementation, but in the future we would need to rename it back :) Thanks. Dmitry.

Marcus Börger

19 years ago
Hello Dmitry, LOL, and in the future we have to rename PHP as it is no longer for homepages? Friday, August 17, 2007, 9:01:12 AM, you wrote:
> Hi,
> We are still working on namespace concept and its features. > I am not sure that existing concept will work well as is. > So please, don't make us additional troubles. > The name is important but it may be changed later, first look into concept > itself. > Do you completely satisfied with it? > Have you tried to use it in real life applications or frameworks? > Have you measured slowdown? > Do you see holes in concept? > These questions are more important then the name...
> BTW: I personally would accept 'package' for current implementation, but in > the future we would need to rename it back :)
> Thanks. Dmitry.
>> -----Original Message----- >> From: Johannes Schlьter [mailto:johannes@php.net] >> Sent: Thursday, August 16, 2007 10:14 PM >> To: Dmitry Stogov >> Cc: 'PHP Internals List' >> Subject: RE: [PHP-DEV] Renaming namespaces to packages >> >> >> Hi, >> >> On Thu, 2007-08-16 at 09:33 +0400, Dmitry Stogov wrote: >> > At least, I have one additional namespace related patch, >> that is not >> > accepted yet. >> > >> > Renaming may require a lot of additional work with it. >> >> Well, in my experience it's simpler to do such renaming >> inside an patch (then it's a simple sed command) than after >> committing it to the tree where you have to make sure not to >> accidentally rename other, unrelated, stuff, too. That's the >> reason why I tried to do the renaming asap. >> >> > Also, I am not sure that allbody agree with "package". >> >> I didn't read all mails in that thread but from what I saw >> only Stanislaw was against renaming it. I for myself don't >> care really much about the name, but I tend to follow >> Marcus's argumentation[1] for "package", it tastes a bit >> better for me. >> >> What I would like is a soonish decision so we can advertise >> that feature and get people testing it and playing with it >> without having to fear that their (test-)code breaks the next >> day. (I didn't say it won't brake the next day then, but it's >> good to give less excuses for not testing that stuff. This >> testing would also include mysqlnd, unicode and whatever else >> we have in HEAD right now) >> >> johannes >> >> [1] http://news.php.net/php.internals/31328 >> >> > Thanks. Dmitry. >> > >> > > -----Original Message----- >> > > From: Derick Rethans [mailto:derick@php.net] >> > > Sent: Wednesday, August 15, 2007 10:25 PM >> > > To: Dmitry Stogov >> > > Cc: 'PHP Internals List' >> > > Subject: RE: [PHP-DEV] Renaming namespaces to packages >> > > >> > > >> > > On Fri, 10 Aug 2007, Dmitry Stogov wrote: >> > > >> > > > I have no serious objections about renaming. I am >> asking to wait a >> > > > bit. >> > > >> > > If you think "package" is fine, why wait with renaming it? >> > > >> > > regards, >> > > Derick >> > > >> > > -- >> > > Derick Rethans >> > > http://derickrethans.nl | http://ez.no | http://xdebug.org >> > > >> > >>
Best regards, Marcus

Robert Cummings

19 years ago
On Mon, 2007-08-20 at 12:13 +0200, Marcus Boerger wrote:
> Hello Dmitry, > > LOL, and in the future we have to rename PHP as it is no longer for > homepages?
I thought it was renamed already to PHP Hypertext Processor :) Cheers, Rob.
-- ........................................................... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ...........................................................

Tyler Lawson

19 years ago
Why not use both names? For all of those distributing frameworks and such, use "package". And for everybody else, who just wants to shorten their class names, use "namespace". It's probably easier said than done, but why not just alias one to the other? Tyler

Tijnema !

19 years ago
On 8/10/07, Johannes Schlüter <johannes@php.net> wrote:
> Hi, > > I think we reached the consensus to rename namespaces to packages as our > implementation is more package-like. Therefore I wrote the corresponding > patch which tries to get rid of all "namespaces" and "ns" (well, not all > "ns" only the namespace-related ones of course) used in the code. > Additionally I changed all package-tests. Any objections? > > Does anybody (with the move-on-CVS-server powers) care about the history > of the tests? Then please cp ZendEngine2/tests/ns_* to pkg_* there else > I'll do a simple cvs rm and cvs add. > > The patch is at > http://schlueters.de/~johannes/php/zend_namespace_to_package.diff and > the tarball with the changed tests at > http://schlueters.de/~johannes/php/zend_package_tests.tar.bz2 > > johannes >
Just a little note, right now, your patch doesn't seem to work Johannes. It's saying that T_NAMESPACE and T_NS can't be found in Zend/zend_language_scanner.c. Extra patch (that worked for me): --------zend_packages_extra_patch.patch------ --- Zend/zend_language_scanner.c 31 Jul 2007 23:23:37 -0000 +++ Zend/zend_language_scanner.c 16 Aug 2007 20:13:24 -0000 @@ -5415,7 +5415,7 @@ case 59: YY_RULE_SETUP { - return T_NAMESPACE; + return T_PACKAGE; } YY_BREAK case 60: @@ -5908,13 +5908,13 @@ case 118: YY_RULE_SETUP { - if (CG(current_namespace)) { - *zendlval = *CG(current_namespace); + if (CG(current_package)) { + *zendlval = *CG(current_package); zval_copy_ctor(zendlval); } else { ZVAL_EMPTY_TEXT(zendlval); } - return T_NS_C; + return T_PKG_C; } YY_BREAK case 119: ---------------------------------- Tijnema
-- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

Johannes Schlueter

19 years ago
Hi Tijnema, On Thu, 2007-08-16 at 20:27 +0200, Tijnema wrote:
> On 8/10/07, Johannes Schlüter <johannes@php.net> wrote: > > Hi, > > > > I think we reached the consensus to rename namespaces to packages as our > > implementation is more package-like. Therefore I wrote the corresponding > > patch which tries to get rid of all "namespaces" and "ns" (well, not all > > "ns" only the namespace-related ones of course) used in the code. > > Additionally I changed all package-tests. Any objections? > > > > Does anybody (with the move-on-CVS-server powers) care about the history > > of the tests? Then please cp ZendEngine2/tests/ns_* to pkg_* there else > > I'll do a simple cvs rm and cvs add. > > > > The patch is at > > http://schlueters.de/~johannes/php/zend_namespace_to_package.diff and > > the tarball with the changed tests at > > http://schlueters.de/~johannes/php/zend_package_tests.tar.bz2 > > > > johannes > > > > Just a little note, right now, your patch doesn't seem to work > Johannes. It's saying that T_NAMESPACE and T_NS can't be found in > Zend/zend_language_scanner.c. > > Extra patch (that worked for me): > > --------zend_packages_extra_patch.patch------ > --- Zend/zend_language_scanner.c 31 Jul 2007 23:23:37 -0000 > +++ Zend/zend_language_scanner.c 16 Aug 2007 20:13:24 -0000
If patching that file configure didn't find a proper flex version since that file is generated from Zend/zend_language_scanner.l using flex. johannes

Tijnema !

19 years ago
On 8/16/07, Johannes Schlüter <johannes@php.net> wrote:
> Hi Tijnema, > > On Thu, 2007-08-16 at 20:27 +0200, Tijnema wrote: > > On 8/10/07, Johannes Schlüter <johannes@php.net> wrote: > > > Hi, > > > > > > I think we reached the consensus to rename namespaces to packages as our > > > implementation is more package-like. Therefore I wrote the corresponding > > > patch which tries to get rid of all "namespaces" and "ns" (well, not all > > > "ns" only the namespace-related ones of course) used in the code. > > > Additionally I changed all package-tests. Any objections? > > > > > > Does anybody (with the move-on-CVS-server powers) care about the history > > > of the tests? Then please cp ZendEngine2/tests/ns_* to pkg_* there else > > > I'll do a simple cvs rm and cvs add. > > > > > > The patch is at > > > http://schlueters.de/~johannes/php/zend_namespace_to_package.diff and > > > the tarball with the changed tests at > > > http://schlueters.de/~johannes/php/zend_package_tests.tar.bz2 > > > > > > johannes > > > > > > > Just a little note, right now, your patch doesn't seem to work > > Johannes. It's saying that T_NAMESPACE and T_NS can't be found in > > Zend/zend_language_scanner.c. > > > > Extra patch (that worked for me): > > > > --------zend_packages_extra_patch.patch------ > > --- Zend/zend_language_scanner.c 31 Jul 2007 23:23:37 -0000 > > +++ Zend/zend_language_scanner.c 16 Aug 2007 20:13:24 -0000 > > If patching that file configure didn't find a proper flex version since > that file is generated from Zend/zend_language_scanner.l using flex. > > johannes >
Well, why does PHP compiles fine without the patch?, and why is this file in the snapshot package when it is generated from flex? I have flex 2.5.33 installed btw, that's fine right? Tijnema
-- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

Johannes Schlueter

19 years ago
Hi again, On Thu, 2007-08-16 at 20:50 +0200, Tijnema wrote:
> Well, why does PHP compiles fine without the patch?, and why is this > file in the snapshot package when it is generated from flex?
Since snaps are for users, CVS versions (and patches) are for developers and we expect developers to have the proper tools installed.
> I have flex 2.5.33 installed btw, that's fine right?
Yes, check the output of configure for details why it wasn't found.

Tijnema !

19 years ago
On 8/16/07, Johannes Schlüter <johannes@php.net> wrote:
> Hi again, > > On Thu, 2007-08-16 at 20:50 +0200, Tijnema wrote: > > > Well, why does PHP compiles fine without the patch?, and why is this > > file in the snapshot package when it is generated from flex? > > Since snaps are for users, CVS versions (and patches) are for developers > and we expect developers to have the proper tools installed.
Ah, I'm sorry for that. I find it easier (and faster) to download a snapshot instead of getting it from CVS.
> > > I have flex 2.5.33 installed btw, that's fine right? > > Yes, check the output of configure for details why it wasn't found.
On 8/16/07, Derick Rethans <derick@php.net> wrote:
> No it's not, we only support 2.5.4.
Confusing answers, but anyway, configure doesn't fail on flex, neither does it generate a warning or such. It says (from the log) Checking for flex.. and Checking for flex version.. and btw derick, since when is 2.5.4 newer than 2.5.33? 2.5.4 has been released in 1997, and 2.5.33 in 2006, which is still the latest stable version atm.
-- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

Derick Rethans

19 years ago
On Thu, 16 Aug 2007, Tijnema wrote:
> On 8/16/07, Derick Rethans <derick@php.net> wrote: > > No it's not, we only support 2.5.4.
[snip]
> and btw derick, since when is 2.5.4 newer than 2.5.33? 2.5.4 has been > released in 1997, and 2.5.33 in 2006, which is still the latest stable > version atm.
I didn't say it was newer... the flex developers broken BC. regards, Derick

Antony Dovgal

19 years ago
On 16.08.2007 23:40, Tijnema wrote:
> On 8/16/07, Derick Rethans <derick@php.net> wrote: >> No it's not, we only support 2.5.4. > > Confusing answers, but anyway, configure doesn't fail on flex, neither > does it generate a warning or such. It says (from the log) Checking > for flex.. and Checking for flex version..
It has been discussed numerous times, search the archives. Here is the link for starters: https://sourceforge.net/tracker/?func=detail&atid=618177&aid=1447867&group_id=97492 For quick ones, the answer as to why nobody ever bothered about it: http://marc.info/?l=php-dev&m=105066214431326&w=2
> and btw derick, since when is 2.5.4 newer than 2.5.33? 2.5.4 has been > released in 1997, and 2.5.33 in 2006, which is still the latest stable > version atm.
"Latest stable" doesn't always mean "better". We still use autoconf 2.13 because it's been proved to be the most stable and fastest version ever. But you're encouraged to change this, flex people have left some basic instructions, see the first link I mentioned above.
-- Wbr, Antony Dovgal

Johannes Schlueter

19 years ago
On Thu, 2007-08-16 at 21:27 +0200, Johannes Schlüter wrote:
> > I have flex 2.5.33 installed btw, that's fine right? > > Yes, check the output of configure for details why it wasn't found.
Bah, I hate numbers. We need flex 2.5.4, not 2.5.33. 2.5.33 won't work with the engine's skeleton file. johannes

Derick Rethans

19 years ago
On Thu, 16 Aug 2007, Tijnema wrote:
> Well, why does PHP compiles fine without the patch?, and why is this > file in the snapshot package when it is generated from flex? > > > I have flex 2.5.33 installed btw, that's fine right?
No it's not, we only support 2.5.4. Derick
-- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

Johannes Schlueter

19 years ago
Hi, I've updated the patch to be compatible with Dmitry's latest changes: http://schlueters.de/~johannes/php/zend_namespace_to_package_20070817.diff johannes On Fri, 2007-08-10 at 11:26 +0200, Johannes Schlüter wrote:

David Coallier

19 years ago
Great stuff man! :) Thanks On 8/17/07, Johannes Schlüter <johannes@php.net> wrote:
> Hi, > > I've updated the patch to be compatible with Dmitry's latest changes: > http://schlueters.de/~johannes/php/zend_namespace_to_package_20070817.diff > > johannes > > On Fri, 2007-08-10 at 11:26 +0200, Johannes Schlüter wrote: > > Hi, > > > > I think we reached the consensus to rename namespaces to packages as our > > implementation is more package-like. Therefore I wrote the corresponding > > patch which tries to get rid of all "namespaces" and "ns" (well, not all > > "ns" only the namespace-related ones of course) used in the code. > > Additionally I changed all package-tests. Any objections? > > > > Does anybody (with the move-on-CVS-server powers) care about the history > > of the tests? Then please cp ZendEngine2/tests/ns_* to pkg_* there else > > I'll do a simple cvs rm and cvs add. > > > > The patch is at > > http://schlueters.de/~johannes/php/zend_namespace_to_package.diff and > > the tarball with the changed tests at > > http://schlueters.de/~johannes/php/zend_package_tests.tar.bz2 > > > > johannes > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >
-- David Coallier, Founder & Software Architect, Agora Production (http://agoraproduction.com) 51.42.06.70.18

Richard Quadling

19 years ago
Oh dear. I thought the general feeling was to stick with namespaces? On 17/08/07, Johannes Schlüter <johannes@php.net> wrote: > Hi, > > I've updated the patch to be compatible with Dmitry's latest changes: > http://schlueters.de/~johannes/php/zend_namespace_to_package_20070817.diff > > johannes > > On Fri, 2007-08-10 at 11:26 +0200, Johannes Schlüter wrote: > > Hi, > > > > I think we reached the consensus to rename namespaces to packages as our > > implementation is more package-like. Therefore I wrote the corresponding > > patch which tries to get rid of all "namespaces" and "ns" (well, not all > > "ns" only the namespace-related ones of course) used in the code. > > Additionally I changed all package-tests. Any objections? > > > > Does anybody (with the move-on-CVS-server powers) care about the history > > of the tests? Then please cp ZendEngine2/tests/ns_* to pkg_* there else > > I'll do a simple cvs rm and cvs add. > > > > The patch is at > > http://schlueters.de/~johannes/php/zend_namespace_to_package.diff and > > the tarball with the changed tests at > > http://schlueters.de/~johannes/php/zend_package_tests.tar.bz2 > > > > johannes > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"

Ilia A.

19 years ago
While PHP implementation of namespaces is may not be 100% of what people consider to be namespaces it is close enough and I think the name "namespaces" is most appropriate and clear cut. We don't call PHP objects "Zend Objects" or some other strange name, I don't see why namespaces should be any different IMHO. On 17-Aug-07, at 11:06 AM, Richard Quadling wrote:
> Oh dear. I thought the general feeling was to stick with namespaces? > > On 17/08/07, Johannes Schlüter <johannes@php.net> wrote: >> Hi, >> >> I've updated the patch to be compatible with Dmitry's latest changes: >> http://schlueters.de/~johannes/php/ >> zend_namespace_to_package_20070817.diff >> >> johannes >> >> On Fri, 2007-08-10 at 11:26 +0200, Johannes Schlüter wrote: >>> Hi, >>> >>> I think we reached the consensus to rename namespaces to packages >>> as our >>> implementation is more package-like. Therefore I wrote the >>> corresponding >>> patch which tries to get rid of all "namespaces" and "ns" (well, >>> not all >>> "ns" only the namespace-related ones of course) used in the code. >>> Additionally I changed all package-tests. Any objections? >>> >>> Does anybody (with the move-on-CVS-server powers) care about the >>> history >>> of the tests? Then please cp ZendEngine2/tests/ns_* to pkg_* >>> there else >>> I'll do a simple cvs rm and cvs add. >>> >>> The patch is at >>> http://schlueters.de/~johannes/php/zend_namespace_to_package.diff >>> and >>> the tarball with the changed tests at >>> http://schlueters.de/~johannes/php/zend_package_tests.tar.bz2 >>> >>> johannes >>> >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > > -- > ----- > Richard Quadling > Zend Certified Engineer : http://zend.com/zce.php? > c=ZEND002498&r=213474731 > "Standing on the shoulders of some very clever giants!"
Ilia Alshanetsky

David Coallier

19 years ago
On 8/17/07, Ilia Alshanetsky <ilia@prohost.org> wrote:
> While PHP implementation of namespaces is may not be 100% of what > people consider to be namespaces it is close enough and I think the > name "namespaces" is most appropriate and clear cut. We don't call > PHP objects "Zend Objects" or some other strange name, I don't see > why namespaces should be any different IMHO. >
If we start calling things what they are, then we might as well do it for the *namespaces* as well ? So ccall them package. And Stanislav, it's not only because java does it that way, it's because python also does, and also because c++ doesn't. After all, why discussing the color of the bikeshed when it's already painted and it's a dogshed ?
> > On 17-Aug-07, at 11:06 AM, Richard Quadling wrote: > > > Oh dear. I thought the general feeling was to stick with namespaces? > > > > On 17/08/07, Johannes Schlüter <johannes@php.net> wrote: > >> Hi, > >> > >> I've updated the patch to be compatible with Dmitry's latest changes: > >> http://schlueters.de/~johannes/php/ > >> zend_namespace_to_package_20070817.diff > >> > >> johannes > >> > >> On Fri, 2007-08-10 at 11:26 +0200, Johannes Schlüter wrote: > >>> Hi, > >>> > >>> I think we reached the consensus to rename namespaces to packages > >>> as our > >>> implementation is more package-like. Therefore I wrote the > >>> corresponding > >>> patch which tries to get rid of all "namespaces" and "ns" (well, > >>> not all > >>> "ns" only the namespace-related ones of course) used in the code. > >>> Additionally I changed all package-tests. Any objections? > >>> > >>> Does anybody (with the move-on-CVS-server powers) care about the > >>> history > >>> of the tests? Then please cp ZendEngine2/tests/ns_* to pkg_* > >>> there else > >>> I'll do a simple cvs rm and cvs add. > >>> > >>> The patch is at > >>> http://schlueters.de/~johannes/php/zend_namespace_to_package.diff > >>> and > >>> the tarball with the changed tests at > >>> http://schlueters.de/~johannes/php/zend_package_tests.tar.bz2 > >>> > >>> johannes > >>> > >> > >> -- > >> PHP Internals - PHP Runtime Development Mailing List > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > > > > > -- > > ----- > > Richard Quadling > > Zend Certified Engineer : http://zend.com/zce.php? > > c=ZEND002498&r=213474731 > > "Standing on the shoulders of some very clever giants!" > > Ilia Alshanetsky > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >
-- David Coallier, Founder & Software Architect, Agora Production (http://agoraproduction.com) 51.42.06.70.18

Ilia A.

19 years ago
David, Most people don't know wtf you are referring to by "package", but nearly everyone knows the concept of namespaces. Packages is name for an implementation of namespaces, calling it packages just because language XYZ that I like, does not sound like the best of ideas. On 17-Aug-07, at 11:18 AM, David Coallier wrote:
> On 8/17/07, Ilia Alshanetsky <ilia@prohost.org> wrote: >> While PHP implementation of namespaces is may not be 100% of what >> people consider to be namespaces it is close enough and I think the >> name "namespaces" is most appropriate and clear cut. We don't call >> PHP objects "Zend Objects" or some other strange name, I don't see >> why namespaces should be any different IMHO. >> > > If we start calling things what they are, then we might as well do it > for the *namespaces* as well ? So ccall them package. And Stanislav, > it's not only because java does it that way, it's because python also > does, and also because c++ doesn't. > > After all, why discussing the color of the bikeshed when it's already > painted and it's a dogshed ? >> >> On 17-Aug-07, at 11:06 AM, Richard Quadling wrote: >> >>> Oh dear. I thought the general feeling was to stick with namespaces? >>> >>> On 17/08/07, Johannes Schlüter <johannes@php.net> wrote: >>>> Hi, >>>> >>>> I've updated the patch to be compatible with Dmitry's latest >>>> changes: >>>> http://schlueters.de/~johannes/php/ >>>> zend_namespace_to_package_20070817.diff >>>> >>>> johannes >>>> >>>> On Fri, 2007-08-10 at 11:26 +0200, Johannes Schlüter wrote: >>>>> Hi, >>>>> >>>>> I think we reached the consensus to rename namespaces to packages >>>>> as our >>>>> implementation is more package-like. Therefore I wrote the >>>>> corresponding >>>>> patch which tries to get rid of all "namespaces" and "ns" (well, >>>>> not all >>>>> "ns" only the namespace-related ones of course) used in the code. >>>>> Additionally I changed all package-tests. Any objections? >>>>> >>>>> Does anybody (with the move-on-CVS-server powers) care about the >>>>> history >>>>> of the tests? Then please cp ZendEngine2/tests/ns_* to pkg_* >>>>> there else >>>>> I'll do a simple cvs rm and cvs add. >>>>> >>>>> The patch is at >>>>> http://schlueters.de/~johannes/php/zend_namespace_to_package.diff >>>>> and >>>>> the tarball with the changed tests at >>>>> http://schlueters.de/~johannes/php/zend_package_tests.tar.bz2 >>>>> >>>>> johannes >>>>> >>>> >>>> -- >>>> PHP Internals - PHP Runtime Development Mailing List >>>> To unsubscribe, visit: http://www.php.net/unsub.php >>>> >>>> >>> >>> >>> -- >>> ----- >>> Richard Quadling >>> Zend Certified Engineer : http://zend.com/zce.php? >>> c=ZEND002498&r=213474731 >>> "Standing on the shoulders of some very clever giants!" >> >> Ilia Alshanetsky >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > > -- > David Coallier, > Founder & Software Architect, > Agora Production (http://agoraproduction.com) > 51.42.06.70.18
Ilia Alshanetsky

Guilherme Blanco

19 years ago
Again, you are trying to use a keyword based on what developer's most know. You want to release a sort of namespace implementation and frustrate users, that expect a true namespace implementation. I'd like that language MyPersonalFckinLang implemented it. Everything in this discussion is motivated by Java does this or C++ or C# or Python does that. One package is a specific implementation of namespace which, unhappilly was incorporated by Java. One package ***IS*** a namespace, but applies restrictions. WTF? Yes, look at PHP... it's a kind of namespace implementation (ah packages too), and apply restrictions (one package per file) (ah, packages too, but namespaces allow more than one per file). For your announcement, "PHP has namespace support provided by packages." I am not the bad guy in this entire history, and I hope we can drink a dozen bottles of beer =) together in the future, but PLEASE don't frustrate PHP users by providing them a basic functionality of what you have announced. The filescope is another workaround for namespace implementation. One namespace local import should work in the entire namespace, not only in the file it was imported. AGAIN, here are the list of changes that will make everyone accept namespace as the keyword: - Remove the restriction to one package/namespace per file - Use curly braces to define one namespace - Allow nested definitions namespace N1 { namespace SubN1 { ... } namespace Sub2N1 { ... } } - using/import is related to the namespace/package/whatever scope. If you say these functionalities will be implemented (ok, maybe in PHP6.1 or 6.X), I'd change my vote and I'll fight in the namespaces side. I think not only me, but everyone that is currently suggesting to rename it to packages. I can even try to help in the development of them, but I'll need some help to understand the background of ZE. Sara's book will arrive at home in 4-6 weeks. Regards, On 8/17/07, Ilia Alshanetsky <ilia@prohost.org> wrote: > David, > > Most people don't know wtf you are referring to by "package", but > nearly everyone knows the concept of namespaces. Packages is name for > an implementation of namespaces, calling it packages just because > language XYZ that I like, does not sound like the best of ideas. > > > On 17-Aug-07, at 11:18 AM, David Coallier wrote: > > > On 8/17/07, Ilia Alshanetsky <ilia@prohost.org> wrote: > >> While PHP implementation of namespaces is may not be 100% of what > >> people consider to be namespaces it is close enough and I think the > >> name "namespaces" is most appropriate and clear cut. We don't call > >> PHP objects "Zend Objects" or some other strange name, I don't see > >> why namespaces should be any different IMHO. > >> > > > > If we start calling things what they are, then we might as well do it > > for the *namespaces* as well ? So ccall them package. And Stanislav, > > it's not only because java does it that way, it's because python also > > does, and also because c++ doesn't. > > > > After all, why discussing the color of the bikeshed when it's already > > painted and it's a dogshed ? > >> > >> On 17-Aug-07, at 11:06 AM, Richard Quadling wrote: > >> > >>> Oh dear. I thought the general feeling was to stick with namespaces? > >>> > >>> On 17/08/07, Johannes Schlüter <johannes@php.net> wrote: > >>>> Hi, > >>>> > >>>> I've updated the patch to be compatible with Dmitry's latest > >>>> changes: > >>>> http://schlueters.de/~johannes/php/ > >>>> zend_namespace_to_package_20070817.diff > >>>> > >>>> johannes > >>>> > >>>> On Fri, 2007-08-10 at 11:26 +0200, Johannes Schlüter wrote: > >>>>> Hi, > >>>>> > >>>>> I think we reached the consensus to rename namespaces to packages > >>>>> as our > >>>>> implementation is more package-like. Therefore I wrote the > >>>>> corresponding > >>>>> patch which tries to get rid of all "namespaces" and "ns" (well, > >>>>> not all > >>>>> "ns" only the namespace-related ones of course) used in the code. > >>>>> Additionally I changed all package-tests. Any objections? > >>>>> > >>>>> Does anybody (with the move-on-CVS-server powers) care about the > >>>>> history > >>>>> of the tests? Then please cp ZendEngine2/tests/ns_* to pkg_* > >>>>> there else > >>>>> I'll do a simple cvs rm and cvs add. > >>>>> > >>>>> The patch is at > >>>>> http://schlueters.de/~johannes/php/zend_namespace_to_package.diff > >>>>> and > >>>>> the tarball with the changed tests at > >>>>> http://schlueters.de/~johannes/php/zend_package_tests.tar.bz2 > >>>>> > >>>>> johannes > >>>>> > >>>> > >>>> -- > >>>> PHP Internals - PHP Runtime Development Mailing List > >>>> To unsubscribe, visit: http://www.php.net/unsub.php > >>>> > >>>> > >>> > >>> > >>> -- > >>> ----- > >>> Richard Quadling > >>> Zend Certified Engineer : http://zend.com/zce.php? > >>> c=ZEND002498&r=213474731 > >>> "Standing on the shoulders of some very clever giants!" > >> > >> Ilia Alshanetsky > >> > >> -- > >> PHP Internals - PHP Runtime Development Mailing List > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > > > > > -- > > David Coallier, > > Founder & Software Architect, > > Agora Production (http://agoraproduction.com) > > 51.42.06.70.18 > > Ilia Alshanetsky > > -- > 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: guilhermeblanco@hotmail.com URL: http://blog.bisna.com São Carlos - SP/Brazil

Stanislav Malyshev

19 years ago
> Again, you are trying to use a keyword based on what developer's most > know. You want to release a sort of namespace implementation and > frustrate users, that expect a true namespace implementation.
Please stop doing this. PHP namespace implementation is as "true" as it gets, even in current form (which of course might be changed, extended, etc. but it doesn't make it less true). If you have any specific feature missing (except for braces which were discussed already in length so please mention them _only_ if you have something new to say about it) - this is exactly the time to say it, since we are still in prototyping stage, so please do bring it forward. But please do not just decry it because it uses slightly different syntax than some other language you know.
-- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

scott lewis

19 years ago
On 17 Aug 2007, at 1146, Stanislav Malyshev wrote:
>> Again, you are trying to use a keyword based on what developer's most >> know. You want to release a sort of namespace implementation and >> frustrate users, that expect a true namespace implementation. > > Please stop doing this. PHP namespace implementation is as "true" > as it gets, even in current form (which of course might be changed, > extended, etc. but it doesn't make it less true).
I think you've missed his point. He's not talking about the abstract concept of namespaces. He's talking about specific language features accessed via the keyword 'namespace'. The core of the argument to rename is that using the keyword 'namespace' will confuse developers who have experience with that keyword in other languages, since PHP does not match the most common syntax (C++). This is completely separate from whether the PHP language feature is a good implementation of the abstract namespace concept. The keyword does not define the feature -- the keyword defines _expectations_ about the keyword. PHP is getting a namespaces feature -- this is excellent. Giving it the same keyword as a syntax-incompatible feature of other languages is going to cause confusion -- that's bad. Now, the keyword 'package' has similar problems, but to a much smaller degree since the syntax of the PHP language feature is similar to that of the Java feature. Still, any confusion is best avoided so 'package' should probably join 'namespace' on the pile of rejected keywords. 'prefix', as suggested in the other thread, seems to nicely describe the concept and would still describe the concept if the feature was extended out to full-on C++- or Java-style syntax. And I can't think of any languages with a confusingly similar keyword. scott.

Marcus Börger

19 years ago
Hello Stanislav, interesting, we are still in prototype form....hmmm since when do we commit proto types? I thought we are supposed to show patches until they work as expected. So remembering the other new mails you guys wrote recently....we might drop all of this again, we might rename all of it, we might replace it completley... what the hell is going on here? marcus Friday, August 17, 2007, 7:46:44 PM, you wrote:
>> Again, you are trying to use a keyword based on what developer's most >> know. You want to release a sort of namespace implementation and >> frustrate users, that expect a true namespace implementation.
> Please stop doing this. PHP namespace implementation is as "true" as it > gets, even in current form (which of course might be changed, extended, > etc. but it doesn't make it less true). > If you have any specific feature missing (except for braces which were > discussed already in length so please mention them _only_ if you have > something new to say about it) - this is exactly the time to say it, > since we are still in prototyping stage, so please do bring it forward. > But please do not just decry it because it uses slightly different > syntax than some other language you know. > -- > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com
Best regards, Marcus

Stanislav Malyshev

19 years ago
> interesting, we are still in prototype form....hmmm since when do we > commit proto types? I thought we are supposed to show patches until they > work as expected. So remembering the other new mails you guys wrote > recently....we might drop all of this again, we might rename all of it, we
I don't think it's likely we drop it, as for renaming - wasn't it you who pushed for it? :) I'm all for leaving it as it is :)
> might replace it completley... what the hell is going on here?
Complex opensource project development? Frankly, I don't know how many people would even look at it if it was only in patch form - it's very big and complex patch.
-- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com