Re: [PHP-DEV] RE : Namespaces and __autoload()

2007-09-12 Thread Paweł Stradomski
W liście Stanislav Malyshev z dnia środa, 12 września 2007: > >> function doSomething (Service s) {...} > >> > >> PHP tries to autoload type Service, but it can't know if it's looking > > Actually, in this case (and in any case where type of existing object is > checked) autoloading is unnecessary

Re: [PHP-DEV] RE : Namespaces and __autoload()

2007-09-12 Thread Stanislav Malyshev
function doSomething (Service s) {...} PHP tries to autoload type Service, but it can't know if it's looking Actually, in this case (and in any case where type of existing object is checked) autoloading is unnecessary (and it's a bug if it happens) since if the type Service is not loaded, th

Re: [PHP-DEV] RE : Namespaces and __autoload()

2007-09-12 Thread Paweł Stradomski
W liście Stut z dnia środa, 12 września 2007 15:59: > LAUPRETRE François (P) wrote: > >> From: Stut [mailto:[EMAIL PROTECTED] > >> > >> This would need to come from the user implementation of __autoload > >> through naming conventions or a lookup table. PHP does not > >> get involved > >> with reso

[PHP-DEV] Re: RE : [PHP-DEV] RE : Namespaces and __autoload()

2007-09-12 Thread Stut
LAUPRETRE François (P) wrote: From: Stut [mailto:[EMAIL PROTECTED] This would need to come from the user implementation of __autoload through naming conventions or a lookup table. PHP does not get involved with resolving a type to a filename, and rightly so. The question is not to have PHP

[PHP-DEV] RE : [PHP-DEV] RE : Namespaces and __autoload()

2007-09-12 Thread P
> From: Stut [mailto:[EMAIL PROTECTED] > > This would need to come from the user implementation of __autoload > through naming conventions or a lookup table. PHP does not > get involved > with resolving a type to a filename, and rightly so. The question is not to have PHP get involved in the s

Re: [PHP-DEV] RE : [PHP-DEV] RE : Namespaces and __autoload()

2007-09-12 Thread Marcus Boerger
Hello LAUPRETRE, Wednesday, September 12, 2007, 3:32:13 PM, you wrote: >> From: Pawel Stradomski [mailto:[EMAIL PROTECTED] >> >> B), but what with following language construct: >> >> function doSomething (Service s) {...} >> >> PHP tries to autoload type Service, but it can't know if it's >>

[PHP-DEV] RE : [PHP-DEV] RE : Namespaces and __autoload()

2007-09-12 Thread P
> From: Pawel Stradomski [mailto:[EMAIL PROTECTED] > > B), but what with following language construct: > > function doSomething (Service s) {...} > > PHP tries to autoload type Service, but it can't know if it's > looking for interface or class. Both are possible. Correct. I didn't consider th

Re: [PHP-DEV] RE : Namespaces and __autoload()

2007-09-12 Thread Stut
Paweł Stradomski wrote: W liście LAUPRETRE François z dnia środa, 12 września 2007 12:38: What do you mean by "try both"? Could you explain a bit more on that? Yes. PHK's autoload handler is not filename-based. It works as a (poor man's :) runtime linker, with a symbol map. In this map, interfa

Re: [PHP-DEV] RE : Namespaces and __autoload()

2007-09-12 Thread Paweł Stradomski
W liście LAUPRETRE François z dnia środa, 12 września 2007 12:38: > > > > What do you mean by "try both"? Could you explain a bit more on that? > > Yes. PHK's autoload handler is not filename-based. It works as a (poor > man's :) runtime linker, with a symbol map. In this map, interfaces and > clas

[PHP-DEV] RE : Namespaces and __autoload()

2007-09-12 Thread P
> From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] > > This is a good point - raising errors in chained autoloader > makes little > sense since next one in chain might be able to load the > class. However, > I am still concerned about the performance impact - exhausting all > autoloading op