Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Tudor Prodan
Well, given how much PHP has copied from C (and I mean that in a good way), why not copy the sane, less-controversial namespace separator and behavior that we all know and love? \Tudor On Sun, Oct 26, 2008 at 4:23 PM, Lester Caine [EMAIL PROTECTED] wrote: Tudor Prodan wrote: PHP has to be

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Alexey Zakhlestin
On Mon, Oct 27, 2008 at 12:33 PM, Tudor Prodan [EMAIL PROTECTED] wrote: Well, given how much PHP has copied from C (and I mean that in a good way), why not copy the sane, less-controversial namespace separator and behavior that we all know and love? because C is static, and PHP is dynamic it

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Vesselin Kenashkov
I want to express my happiness of finally having an agreement/solution for the namespaces. I have something like 70 000 LOC with namespaces (and a lot of static calls/class consts) so it will take some time to convert it to \ but I'm still very happy to have a solution. Like Karsten Dambekalns

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Thomas Lee
Lester Caine wrote: The backslash is not ideal, but I think we all need to get behind it rather than complaining. The only other real alternative today is to shelve namespaces altogether for the next release rather than putting something in that is simply not practical to extend later? I'd

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Arvids Godjuks
This was argued for months, there was tons of emails to read and backslash is best for most people. PHP is dynamic language - that makes some major restrictions, so you just can't apply something that is already in use easily. That's why :: was rejected in first place. That's why . was rejected,

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Jevon Wright
So does that mean the new NS operator is actually \\ and not \ ? No developer is going to be relying on single \'s -- too likely to become an error in maintenence, and too inconsistent (see strings discussion). Jevon On Tue, Oct 28, 2008 at 12:11 AM, Arvids Godjuks [EMAIL PROTECTED]wrote:

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Thomas Lee
I disagree that PHP being a dynamic language justifies the introduction of deeply unpopular syntax. I mean, PHP developers are your end users. Bad past design decisions aside, you don't want to alienate your users. And yes, this has probably been argued in the past. Unfortunately, it looks

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Derick Rethans
On Mon, 27 Oct 2008, Thomas Lee wrote: I disagree that PHP being a dynamic language justifies the introduction of deeply unpopular syntax. I mean, PHP developers are your end users. Bad past design decisions aside, you don't want to alienate your users. And yes, this has probably been

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Steph Fox
Hi Thomas, Anyway, my point is that there may be other options. Such as putting off a long-sought feature until it can be implemented properly. OK, since you obviously didn't do any background reading before posting to this list, let me direct you to the history behind this decision once

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Alain Williams
I apologise for being silent on this issue to date (been busy), but I feel that I must comment even if the decision is now 'final'. On Mon, Oct 27, 2008 at 10:38:07PM +1100, Thomas Lee wrote: I disagree that PHP being a dynamic language justifies the introduction of deeply unpopular syntax. I

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Tudor Prodan
I agree with Thomas Lee, if the backslash ever gets released, it's there forever. Who uses functions and variables in a namespace anyway? very few Will that small part of the users even use namespaces? probably not So, why not ban these from namespaces and save all the trouble? If however a user

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread David Grudl
On Mon, 27 Oct 2008, Thomas Lee wrote: How would delyaing it help? I agree, delaying will not help (and namespaces are the most expected feature in PHP 5.3). If we could have made :: work, we would have. Greg (and others) spend countless hours trying out different concepts, with different

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Vesselin Kenashkov
1. One user of namespaced constants functions here... I dont like to use objects for everything. I have very few constants functions but I would like them to remain constants functions instead of converting them to static classes or object methods. 2. One reason against dropping ns for

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Thomas Lee
Steph Fox wrote: Hi Thomas, Anyway, my point is that there may be other options. Such as putting off a long-sought feature until it can be implemented properly. OK, since you obviously didn't do any background reading before posting to this list, let me direct you to the history behind

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Thomas Lee
David Grudl wrote: But what is the purpose of namespaces? To give developers their own separated space. And it is their responsibility to not use ambiguous names. PHP has not problem with class Foo::Bar and namespace Foo::Bar, but coding standards usually prohibits it. +1 to that.

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Steph Fox
Hi Thomas, Actually I've been following namespaces for a fair while, but the issue of :: being a problem wasn't really raised until a few weeks ago. So while I'm aware of namespaces being under discussion for a fair while, yesterday was the first I'd heard about a decision being made for the

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Sean Coates
Actually I've been following namespaces for a fair while, but the issue of :: being a problem wasn't really raised until a few weeks ago. I realize this isn't a terribly constructive comment as it doesn't solve any problems, but I hope it's constructive in the way that it actually causes

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Stanislav Malyshev
Hi! If you read everything linked from that RFC, you will discover that there are two ways to implement namespace support in PHP 'properly'. 1) We can offer support for classes only and throw a fatal error when a function is encountered in namespaced code 2) We can use a namespace separator

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Steph Fox
These aren't the only ways. OK. 4) Claim that there is no real problem in addressing ambiguous situations. - Steph -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Stanislav Malyshev
Hi! OK. 4) Claim that there is no real problem in addressing ambiguous situations. This is not what I meant, but there's obviously neither use nor interest in further discussing this topic as decision was already taken. I only wish people would not start rewriting history as other opinions

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Steph Fox
This is not what I meant, but there's obviously neither use nor interest in further discussing this topic as decision was already taken. I only wish people would not start rewriting history as other opinions or options didn't even exist so soon. I'm fine with making the choice, what I'm not

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Lester Caine
Vesselin Kenashkov wrote: 1. One user of namespaced constants functions here... I dont like to use objects for everything. I have very few constants functions but I would like them to remain constants functions instead of converting them to static classes or object methods. 2. One reason

[PHP-DEV] RE: /endnamespacediscussion

2008-10-26 Thread Tudor Prodan
Hi, PHP has to be unique, using the double colon notation would be too cliche, but if we're not respecting conventions, why not go with something more exotic? I've always liked the o with the slash trough it. The e with the horizontal colon is also pretty nice. The n with the tilde over it, it so

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-26 Thread Lester Caine
Tudor Prodan wrote: PHP has to be unique, using the double colon notation would be too cliche, but if we're not respecting conventions, why not go with something more exotic? I've always liked the o with the slash trough it. The e with the horizontal colon is also pretty nice. The n with the

[PHP-DEV] Re: /endnamespacediscussion

2008-10-25 Thread David Grudl
I hope it is only very bad joke :-( namespace myNamespace; class theLoader { function load($class) { ... } } // somewhere else spl_autoload_register(array(myNamespace\theLoader, load)); - registers myNamespacetabheLoader::load() David Grudl Původní zpráva Předmět:

[PHP-DEV] Re: /endnamespacediscussion

2008-10-25 Thread Gregory Beaver
David Grudl wrote: I hope it is only very bad joke :-( namespace myNamespace; class theLoader { function load($class) { ... } } // somewhere else spl_autoload_register(array(myNamespace\theLoader, load)); - registers myNamespacetabheLoader::load() Fortunately, there is a