Re: Questions regarding DateTimeImmutable
| From: | Derick Rethans | Date: | Tue, 19 Feb 2013 12:01:18 +0000 |
| Subject: | Re: Questions regarding DateTimeImmutable | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-65930@lists.php.net to get a copy of this message | ||
On Fri, 15 Feb 2013, Sanford Whiteman wrote:
> I think it was done to ease adoption even though it was known to
> violate LSP. To quote Stas, "As for established practice, everybody
> expects DateTime, so IMHO we should leave DateTime as base class even
> though it's not strictly OO-pure."
>
> This way does let users sub in DateTimeImmutable more easily and patch
> over a ton of unintended -- maybe not even fully noted or understood
> -- defects in their apps? I dunno.
Yes, that's exactly the idea.
cheers,
Derick