> De : Robert Stoll [mailto:p...@tutteli.ch]
>
> The theory is actually quite simple. Roughly it says that if you use a type 
> hint
> of a certain class then you can rely on all pre/post-conditions of this class
> even if a sub-class is passed. Hence the sub-class cannot have more restrict
> conditions.

> I guess from the example above it should be clear why D has implemented it
> this way

OK. Thanks for your explanations.

What I meant is that, while I understand the theory, I don't understand the 
reason *why* it must be done this way.

An additional point is that, IMO, It is impossible for a software to enforce 
the theory and check that a set of conditions is more or less restrictive than 
another one, except analyzing them, which is far beyond our possibilities. So, 
IMO, we can just give it as a convention, which is quite poor. That's why I 
preferred to use another logic. But I would like to know if it won't bring 
other problems later.

Regards

François


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

Reply via email to