Re: Method overloading by method signature
| From: | Alexey Zakhlestin | Date: | Sat, 13 Oct 2007 20:22:25 +0000 |
| Subject: | Re: Method overloading by method signature | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-32748@lists.php.net to get a copy of this message | ||
Hans, such overloading would be incompatible with php's dynamic nature
As far as I remember, even type-hinting for basic-types (strings,
integers) was rejected
On 10/13/07, Hans Moog <hans.moog@mkj-computing.de> wrote:
> Will method overloading by method signature be implemented in php6 or
> even php 5.3?
>
>
>
> Example:
>
> <?php
>
> namespace xyz;
>
>
>
> import core::TestClass;
>
>
>
> class Test extends TestClass {
>
> public string function test(integer $int) {
>
> return "Hi";
> }
>
>
>
> public integer function test(string $string, integer $int) {
>
> return $int;
> }
> }
>
> ?>
>
>
>
> I think this would be a very big advantage and would help developers to
> write better code.
>
>
--
Alexey Zakhlestin
http://blog.milkfarmsoft.com/