Re: Re: Multi-Method Dispatch in PHP 5.1?
| From: | Christian Schneider | Date: | Wed, 21 Apr 2004 09:13:35 +0000 |
| Subject: | Re: Re: Multi-Method Dispatch in PHP 5.1? | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9443@lists.php.net to get a copy of this message | ||
Michael Walter wrote:
How exactly do you think are default parameters related to the issue, anyway?Java uses multi-method dispatch to work around missing default values: function foo($a, $some_flag) { ... } function foo($a) { foo($a, false); } instead of function foo($a, $some_flag = false) { ... }
I assume you are you aware of what dynamic dispatch is trying to solveWhatever example I'd give you'd probably say it's not the relevant one. But if you give me a use case for dynamic dispatch I show you how I'd do it in PHP. Maybe we should take that off list though and present just the result of our research :-) - Chris