Re: [PHP-DEV] [PATCH] Namespace Patch, Beta 1

2005-08-03 Thread Marcus Boerger
Hello Jessie, what ever you want auto-of-the-box is good. I suggest the simplest possible way as default which is we simply stay like we are doing now and only include a replacement from ':' to the current directory separator. That we would be searching for '.inc' and '.inc.php' per default in

Re: [PHP-DEV] [PATCH] Namespace Patch, Beta 1

2005-08-03 Thread Marcus Boerger
Hello Michael, i suffest that pear finally takes a better approach with the arrival of namespaces then the ugly workaround of '_'. If pear doesn#t want to i suggest pear simply writes it's own __autoload(). marcus Tuesday, August 2, 2005, 6:01:18 PM, you wrote: Hi Jessie Hernandez, you

Re: [PHP-DEV] [PATCH] Namespace Patch, Beta 1

2005-08-03 Thread Michael Wallner
Hi Marcus Boerger, you wrote: Hello Michael, i suffest that pear finally takes a better approach with the arrival of namespaces then the ugly workaround of '_'. Of course -- PEAR would benefit a lot of namespaces! -- Michael - mike(@)php.net signature.asc Description: OpenPGP digital

Re: [PHP-DEV] [PATCH] Namespace Patch, Beta 1

2005-08-03 Thread Jessie Hernandez
Hello Marcus, This simple change will make class imports work out of the box, which is pretty good. What won't work out of the box are namespace imports. I think we should provide this also (using the same logic as I'm using in namespace_autoload.php). Even though this will complicate the default

Re: [PHP-DEV] [PATCH] Namespace Patch, Beta 1

2005-08-03 Thread James Crumpton
Maybe I'm alone on this, but all my class files are named as Classname.class.php... (hint, hint) :) ... On second thought, maybe it would be interesting/useful to have some mechanism to allow a formatted string like %s.foo.php or foo.%s.php to be used by spl's autoload? Not really sure how

RE: [PHP-DEV] [PATCH] Namespace Patch, Beta 1

2005-08-02 Thread David Zülke
This sounds awesome. Good job, Jessie. Keep it up! - David -Original Message- From: Jessie Hernandez [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 02, 2005 6:07 AM To: internals@lists.php.net Subject: [PHP-DEV] [PATCH] Namespace Patch, Beta 1 Attached is the latest version

Re: [PHP-DEV] [PATCH] Namespace Patch, Beta 1

2005-08-02 Thread John LeSueur
Jessie Hernandez wrote: Attached is the latest version of the namespace patch! It finally includes namespace imports and it even includes anonymous namespace support. Also, the previous bison shift/reduce conflict has been removed. Here is a summary of its features: - Simple imports: import

Re: [PHP-DEV] [PATCH] Namespace Patch, Beta 1

2005-08-02 Thread Jessie Hernandez
Forgot to mention, since I expect the majority of users to follow the PEAR convention for their classes (basically one class per file, file is named like class, with namespace directories), then maybe a default implementation can be provided in SPL's autoload. That way, namespace imports can be

Re: [PHP-DEV] [PATCH] Namespace Patch, Beta 1

2005-08-02 Thread Michael Wallner
Hi Jessie Hernandez, you wrote: Forgot to mention, since I expect the majority of users to follow the PEAR convention for their classes (basically one class per file, file is named like class, with namespace directories) With the minor but essential logical difference: $file =

Re: [PHP-DEV] [PATCH] Namespace Patch, Beta 1

2005-08-02 Thread Jessie Hernandez
Hi Michael, Yes, I am aware of this. Underscores were used due to the lack of namespaces. For user classes which use namespaces (and in the case where some PEAR classes get modified to be under namespaces), the colon would be used as the separator, and this would get replaced by the slash to form

Re: [PHP-DEV] [PATCH] Namespace Patch, Beta 1

2005-08-02 Thread Andi Gutmans
FYI, I haven't had a chance to look at this patch yet (nor a lot of the emails on the subject). After PHP 5.1 goes RC and we start our Unicode work, I should have time to look into it. Interesting to see if it addresses the issues we had in the past. I think some of them weren't solvable

[PHP-DEV] [PATCH] Namespace Patch, Beta 1

2005-08-01 Thread Jessie Hernandez
Attached is the latest version of the namespace patch! It finally includes namespace imports and it even includes anonymous namespace support. Also, the previous bison shift/reduce conflict has been removed. Here is a summary of its features: - Simple imports: import ns:class1; - Import aliases: