Re: by-ref return & inheritance
| From: | Marcus Boerger | Date: | Fri, 08 Aug 2008 22:27:25 +0000 |
| Subject: | Re: by-ref return & inheritance | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-39781@lists.php.net to get a copy of this message | ||
Hello Stanislav,
Saturday, August 9, 2008, 12:16:29 AM, you wrote:
> Hi!
>> I think we may want to stick to our is-a mantra.
> I'm not sure I understand what you mean here. But our principle was to
> allow things that do not violate the LSP - such as adding optional
> parameters, for example. I think returning by-ref can be allowed on the
> same principle. Is there any problem with allowing it that you see?
Yes, it breaks the principle. E.g. caller knows callee returns by ref - you
break this, as easy as that.
Best regards,
Marcus