Re: AW: [PHP-DEV] Method overloading by method signature

2007-10-18 Thread Marcus Boerger
Hello Umberto, Monday, October 15, 2007, 3:36:22 PM, you wrote: > Posting to newsgroup php.internals, Stanislav Malyshev wrote: >> > only reason to use type hints - to ensure the method is used >> > correctly and build more robust applications), it is better to tell >> >> BTW, I'm not sure how

Re: AW: [PHP-DEV] Method overloading by method signature

2007-10-16 Thread Christian Schneider
Hans Moog wrote: When it would be: == function xpath(DomDocument $arg) { return new DomXPath($arg); } function xpath(XmlTree $arg) { return new DomXPath($this->loadXML($arg->getSource(; } function xpath(string $arg) { return new DomXPath($this->loadXML($arg)); } ==

Re: AW: [PHP-DEV] Method overloading by method signature

2007-10-15 Thread Stanislav Malyshev
That's why I developed PHPLint, a PHP parser and validator that performs a static analysis of the source, ensuring the safe handling of types. In a word, this tool makes PHP very close to a strong-typed language without the need to further complicate the interpreter with new features that would pe

Re: AW: [PHP-DEV] Method overloading by method signature

2007-10-15 Thread Ken Stanley
t;php way" - so there is still hope :P ) > > -Ursprüngliche Nachricht- > Von: Umberto Salsi [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 15. Oktober 2007 16:36 > An: internals@lists.php.net > Betreff: Re: AW: [PHP-DEV] Method overloading by method signature > > Po

Re: AW: [PHP-DEV] Method overloading by method signature

2007-10-15 Thread Daniel T. Gorski
On 15 Oct 18:15, Hans Moog wrote: > But since I and Richard Quadling seem to be the only ones who would like > to have this feature in php [...] No, you are of course not alone. ragards dtg -- _ ASCII ribbon campaign ( ) against HTML e-mailX

Re: AW: [PHP-DEV] Method overloading by method signature

2007-10-15 Thread Umberto Salsi
Posting to newsgroup php.internals, Stanislav Malyshev wrote: > > only reason to use type hints - to ensure the method is used > > correctly and build more robust applications), it is better to tell > > BTW, I'm not sure how exactly it makes the code more robust - if you > call it with wrong typ

Re: AW: [PHP-DEV] Method overloading by method signature

2007-10-15 Thread Umberto Salsi
Posting to newsgroup php.internals, you wrote: > > But if you want to be more strict and limit the coder to use your > > functions only with a specific parameter signature (and thats the > > The purpose of signature overloading in most languages isn't input type > control, it's different functio

Re: AW: [PHP-DEV] Method overloading by method signature

2007-10-15 Thread Richard Quadling
On 14/10/2007, Hans Moog <[EMAIL PROTECTED]> wrote: > You are missing something. Using this new feature would be voluntarily (it is > optional like type hints are already). > > If you want to code the old way and you don't want to force coders to use > your functions correctly, you could leave ou

Re: AW: [PHP-DEV] Method overloading by method signature

2007-10-14 Thread Stanislav Malyshev
But if you want to be more strict and limit the coder to use your functions only with a specific parameter signature (and thats the The purpose of signature overloading in most languages isn't input type control, it's different functionality on different types. However, unlike many other langu

Re: AW: [PHP-DEV] Method overloading by method signature

2007-10-14 Thread Rasmus Lerdorf
Christian Schneider wrote: > Marcus Boerger wrote: >> If you have such a patch you should definitively post it here so >> that we >> can hve a look. Most interesting to us is however the oerformance >> impact. As >> that was the main reason to go any further than adding return type hints. > > Am

Re: AW: [PHP-DEV] Method overloading by method signature

2007-10-14 Thread Christian Schneider
Marcus Boerger wrote: If you have such a patch you should definitively post it here so that we can hve a look. Most interesting to us is however the oerformance impact. As that was the main reason to go any further than adding return type hints. Am I the only here who thinks that performance

Re: AW: [PHP-DEV] Method overloading by method signature

2007-10-14 Thread Marcus Boerger
Hello Hans, If you have such a patch you should definitively post it here so that we can hve a look. Most interesting to us is however the oerformance impact. As that was the main reason to go any further than adding return type hints. marcus Saturday, October 13, 2007, 10:47:23 PM, you wrote: