Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Marcus Boerger
Hello Alex, Tuesday, July 26, 2005, 11:54:02 PM, you wrote: > On Tue, 2005-07-26 at 10:10 +0200, Marcus Boerger wrote: >> > I still think the namespace import behavior should be separate from the >> > __autoload function. Of course, this is just me. What does everyone else >> > think? I'd like to

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Alex Kiesel
On Tue, 2005-07-26 at 10:10 +0200, Marcus Boerger wrote: > > I still think the namespace import behavior should be separate from the > > __autoload function. Of course, this is just me. What does everyone else > > think? I'd like to gather opinions on which is preferred. I will also like > > to kno

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Jessie Hernandez
Hello Alex, "Alex Kiesel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > import $this is just something I'd expect PHP to be able to deal with - > but I could live without it. > I never meant to implement this, and I also agree with Marcus that there's no reason to allow it. > B

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Alex Kiesel
On Mon, 2005-07-25 at 23:59 +0200, Marcus Boerger wrote: > > I don't like this idea; it restricts the developer to this Java-like > > class / directory layout. It also restricts him to name his files after > > the scheme you defined (which is .php) - many use other > > schemes. Shouldn't PHP let yo

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Jessie Hernandez
Hello Weyert, "Weyert de Boer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > May I make some sort of suggestion, without having a closer look at the > internal working of PHP, the below is jsut one big day dream for me. > > My idea is to wrap namespaces by default, for e

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Jessie Hernandez
Yes, you are correct, 'break' should be 'return'. -- Jessie "Marcus Boerger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > On a first sight i only see that 'break' should be 'return'. > > Best regards, > Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsu

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Marcus Boerger
Hello Jessie, Tuesday, July 26, 2005, 8:59:55 PM, you wrote: > "Marcus Boerger" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Hello Weyert, >> >> Tuesday, July 26, 2005, 10:04:28 AM, you wrote: >> >> > Hello, >> >> > How can I use the namespaces support, in such way that I can

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Marcus Boerger
Hello Jessie, Tuesday, July 26, 2005, 5:50:35 PM, you wrote: > Hi Marcus, > "Marcus Boerger" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> >> > 3) Simply pass an extra argument (or pass an array or object as the > first >> > argument) to __autoload containing the names of the

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Jessie Hernandez
"Marcus Boerger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello Weyert, > > Tuesday, July 26, 2005, 10:04:28 AM, you wrote: > > > Hello, > > > How can I use the namespaces support, in such way that I can use with my > > coding guideline? > > > interfaces -> interface.NAME.inc.p

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Jessie Hernandez
Hi Marcus, "Marcus Boerger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > 3) Simply pass an extra argument (or pass an array or object as the first > > argument) to __autoload containing the names of the imported namespaces of > > the calling file. __autoload can then use this

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Weyert de Boer
I will work on a little proof of concept, thingy to see I can make this work. Hopefully I have something nice to show in a while, hope guys won't have serious problems when I use the current lexer etc.? -- Yours, Weyert de Boer ([EMAIL PROTECTED]) innerfuse* http://www.innerfuse.biz/ -- PHP

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Weyert de Boer
Hello, May I make some sort of suggestion, without having a closer look at the internal working of PHP, the below is jsut one big day dream for me. My idea is to wrap namespaces by default, for example when you aren't using any namespace-keywords into your code, the parser will add these acc

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Marcus Boerger
Hello Weyert, Tuesday, July 26, 2005, 10:04:28 AM, you wrote: > Hello, > How can I use the namespaces support, in such way that I can use with my > coding guideline? > interfaces -> interface.NAME.inc.php > classes -> class.NAME.inc.php > It doesn't seem it's possible now, because it's hard c

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Marcus Boerger
Hello Jessie, Tuesday, July 26, 2005, 5:24:02 AM, you wrote: > Marcus Boerger wrote: >> >> You already have the ability to overload __autoload or provide several >> userspace __autoload functions that would be called one after another >> until the first succeeds. What else do you want? Besides

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Weyert de Boer
Hello, How can I use the namespaces support, in such way that I can use with my coding guideline? interfaces -> interface.NAME.inc.php classes -> class.NAME.inc.php It doesn't seem it's possible now, because it's hard coded against NAME.php. Oh well, I might will have a look at it, and try t

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-26 Thread Marcus Boerger
Hello Jessie, i am quite sure it tells you that you have a conflict with the ternary operator. Look up the archives on the issue. There should also be an example on the matter. marcus Tuesday, July 26, 2005, 2:02:56 AM, you wrote: > Alex Kiesel wrote: >> Hi Jessie, >> >> first, while your p

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-25 Thread Jessie Hernandez
Marcus Boerger wrote: > > You already have the ability to overload __autoload or provide several > userspace __autoload functions that would be called one after another > until the first succeeds. What else do you want? Besides the fact that > i am still convinced that we should find a way to pas

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-25 Thread Jessie Hernandez
Alex Kiesel wrote: > Hi Jessie, > > first, while your patch applied cleanly (except zend_vm_opcodes.h, which > is generated) the build broke with: > bison -y -p zend -v -d > /mnt/home/alex/cvs/php-namespaces/Zend/zend_language_parser.y -o > Zend/zend_language_parser.c > conflicts: 5 shift/reduce

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-25 Thread Marcus Boerger
Hello Alex, Monday, July 25, 2005, 11:48:33 PM, you wrote: > Hi Jessie, > first, while your patch applied cleanly (except zend_vm_opcodes.h, which > is generated) the build broke with: > bison -y -p zend -v -d > /mnt/home/alex/cvs/php-namespaces/Zend/zend_language_parser.y -o > Zend/zend_languag

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-25 Thread Alex Kiesel
Hi Jessie, first, while your patch applied cleanly (except zend_vm_opcodes.h, which is generated) the build broke with: bison -y -p zend -v -d /mnt/home/alex/cvs/php-namespaces/Zend/zend_language_parser.y -o Zend/zend_language_parser.c conflicts: 5 shift/reduce /mnt/home/alex/cvs/php-namespaces

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-21 Thread Weyert de Boer
My include path is huge... of course it includes the basic ones, but also my classes path /classes/System/* , /class/System/Exceptions/* etc. Beside of that why clutter the include_path with namespaces? In my opinion it's something different then the rest. p.s. you will support nameless namesp

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-21 Thread Jessie Hernandez
Hello Marcus, In my case at work, my include_path only has three directories: . (current directory), the PEAR path, and the directory where my company's classes are stored. In this case, the namespace import will only have to search in three directories, which is not bad. The class_path would only

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-21 Thread Weyert de Boer
Hello, Well, I wouldn't use the include_path parameter of PHP for the new namespaces lookup code, neither __autoload(). I see it as a major language change -- the support of namespaces, where you should consider to make all need. I suppose you want to support namespace spread over multiple fi

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-21 Thread Marcus Boerger
Hello Jessie, Wednesday, July 20, 2005, 8:35:26 PM, you wrote: > "Marcus Boerger" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Please don't add new ini settings here, living with include_path should be >> enough, wouldn't it? >> > Do we want the import behavior to apply to th

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-20 Thread Jessie Hernandez
Hello Marcus! Thanks for the cvs add "hack", worked like a charm! I'll post an updated patch in a few days. -- Jessie Marcus Boerger wrote: > Hello Jessie, > > Wednesday, July 20, 2005, 6:05:30 AM, you wrote: > >> Private class support has been completed in the attached patch! Again, to >> r

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-20 Thread Jessie Hernandez
"Marcus Boerger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Please don't add new ini settings here, living with include_path should be > enough, wouldn't it? > Do we want the import behavior to apply to the existing include path? To me, it seems nice to have the include_path and

Re: [PHP-DEV] [PATCH] Namespace Patch, Alpha 3

2005-07-19 Thread Marcus Boerger
Hello Jessie, Wednesday, July 20, 2005, 6:05:30 AM, you wrote: > Private class support has been completed in the attached patch! Again, to > reiterate from my last post, the attached patch is a CVS patch, as some > requested me to do. I could not add the test files to the patch because > "cvs add