Re: RfC: rethink OO inheritance strictness
| From: | Richard Quadling | Date: | Wed, 02 Aug 2006 11:44:04 +0000 |
| Subject: | Re: RfC: rethink OO inheritance strictness | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-25116@lists.php.net to get a copy of this message | ||
This is where PHP's strengths can be seen as a weakness. If parameter
overloading is wanted then it would be easier if PHP was not a loosely
typed language.
But, just for arguments sake, if E_STRICT was active _and_ type
hinting was available for ALL types, then at compile time, you COULD
build the appropriate parameter signature.
And parameter overloading could work.
No E_STRICT and you don't have it.
E_STRICT may be the name to use as this would be breaking the
"contract" between parent and child and the issue of "instance of"
does appear again.
I would LOVE type hinting, just so that auto documentors can say that
this function requires a datetime as an integer and not a datetime as
a string (sort of thing).
On 02/08/06, Hartmut Holzgraefe <hartmut@mysql.com> wrote:
Ron Korving wrote: So, my suggestion is this: why not support function overloading in PHP6, because in PHPs dynamicly typed world this would require runtime checks *on every single function call* as things can't be resolved at compile time? ---- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"Hartmut Holzgraefe, Senior Support Engineer .MySQL AB, www.mysql.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php