On Thu, Feb 12, 2015 at 6:01 PM, François Laupretre
<franc...@tekwire.net> wrote:
> Hi Robert,
>
>> De : Robert Stoll [mailto:p...@tutteli.ch]
>>
>> There are several programming languages which do support dynamic typing
>> and method overloading somehow (Clojure, Erlang, Prolog, Cecil and
>> certainly more).  Most of them use a multi-method approach and I think if
>> PHP would introduce function/method overloading, then such an approach
>> would be appropriate. Right now, I need to implement the dynamic
>> dispatching quasi myself which might be more verbose but is also more
>> cumbersome (and uglier IMO). Consider the following (fictional example):
>
> We all agree on the interest of polymorphism on object classes, even if your 
> example could be solved with specialized logger classes, but the question was 
> about polymorphism on different scalar types, which is much more problematic 
> in PHP, even using strict scalar typing.
>
> Cheers
>
> François
>

Hello,

actually, I was speaking about method overloading in general, for both
scalars and objects.

Also, I don't see the problems with scalar method overloading problem
with either weak or strict typing. Could you expand that thought,
please?

Regards
Pavel Kouřil

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to