Hi,

On Mon, Sep 19, 2011 at 12:40, Etienne Kneuss <col...@php.net> wrote:

> Hi,
>
> On Mon, Sep 19, 2011 at 12:18, Gustavo Lopes <glo...@nebm.ist.utl.pt>wrote:
>
>> Em Mon, 19 Sep 2011 10:56:03 +0100, Etienne Kneuss <col...@php.net>
>> escreveu:
>>
>>
>>
>>> Apparently you guys are speaking about the initial implementation of an
>>> abstract method, while I was talking about overriding a method, which is
>>> not the relly same. So the above doesn't really apply.
>>>
>>> The initial implementation of an abstract method should match the
>>> signature,
>>> while overriding a method should be able to loosen the precondition in
>>> many ways (type hints change, less arguments, etc..), IMO.
>>>
>>>
>> I should like to hear why. As far as I can see, there's absolutely no
>> difference. All I've seen in this thread to this respect are semantic
>> pseudo-arguments.
>>
>
> Well it is about semantics, and IMO defining a method as abstract is some
> sort of declaration, and this declaration should be respected when the
> method is actually implemented.
>
> On the other hand, interfaces define usage capabilities, and those usages
> should work.
>
> There might be close to no difference in the way the are internall handled
> currently, but IMO there is a semantic difference between the two.
>

Given that the discussion has now gone into many directions:
- constructors/normal methods
- abstract/interfaces/overriding

Let me write some small RFC describing what we currently do w.r.t. prototype
checks, and also summarize what people propose as changes to them. We can
then discuss those and eventually vote for the way to go forward.


>
>
>> I'd say interfaces are much more likely to include more useless parameters
>> than a concrete method definition, which most likely will only include the
>> arguments it actually needs.
>>
>> An example:
>>
>> http://www.google.com/**codesearch#HmA4mAI_aLc/src/**
>> main/java/terrastore/server/**impl/support/**JsonBucketsProvider.java&q=*
>> *implements%5C%**20MessageBodyWriter&type=cs&l=**36<http://www.google.com/codesearch#HmA4mAI_aLc/src/main/java/terrastore/server/impl/support/JsonBucketsProvider.java&q=implements%5C%20MessageBodyWriter&type=cs&l=36>
>>
>> This is the most common scenario for implementations of this interface
>> (see the other search results).
>
>
>> --
>> Gustavo Lopes
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
> --
> Etienne Kneuss
> http://www.colder.ch
>



-- 
Etienne Kneuss
http://www.colder.ch

Reply via email to