note 73058 added to language.oop5.typehinting
| From: | Edorian at osu1 dot php dot net | Date: | Wed, 07 Feb 2007 18:12:19 +0000 |
| Subject: | note 73058 added to language.oop5.typehinting | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-123062@lists.php.net to get a copy of this message | ||
In response to nicholas at nicholaswilliams dot info:
Of course this doesn't work. Not in Php nor in Java.
You can't put a Chair into Table just because there both implementing "Object"
It wouldn't make any sense to say "i'm expecting an argument that implements the same
object that i'm implementing" with type hinting.
You say: "I'm expection an Object of that Class or a Object of a Subclass of that Class
" like you do in every OO languange.
----
Server IP: 69.147.83.197
Probable Submitter: 212.202.71.199
----
Manual Page -- http://www.php.net/manual/en/language.oop5.typehinting.php
Edit -- https://master.php.net/note/edit/73058
Del: integrated -- https://master.php.net/note/delete/73058/integrated
Del: useless -- https://master.php.net/note/delete/73058/useless
Del: bad code -- https://master.php.net/note/delete/73058/bad+code
Del: spam -- https://master.php.net/note/delete/73058/spam
Del: non-english -- https://master.php.net/note/delete/73058/non-english
Del: in docs -- https://master.php.net/note/delete/73058/in+docs
Del: other reasons-- https://master.php.net/note/delete/73058
Reject -- https://master.php.net/note/reject/73058
Search -- https://master.php.net/manage/user-notes.php