Re: [RFC] Default constructors
| From: | Rowan Collins | Date: | Tue, 18 Nov 2014 14:19:14 +0000 |
| Subject: | Re: [RFC] Default constructors | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-78944@lists.php.net to get a copy of this message | ||
Andrea Faulds wrote on 18/11/2014 13:11:
The thing is that without any way of monkey-patching the default object, there isn't much difference between "all objects have a default constructor" and "all objects have a default parent", other than "$foo instanceOf Object" always returning true. Regards, -- Rowan Collins [IMSoP]On 18 Nov 2014, at 12:47, Ferenc Kovacs <tyra3l@gmail.com> wrote: On Tue, Nov 18, 2014 at 1:35 PM, Ivan Enderlin @ Hoa < ivan.enderlin@hoa-project.net> wrote:I'd certainly like it if everything descended from some class (Object? StdClass?), but I don't like the idea of an empty construct. As Anthony pointed out last time, you can't do inheritance and simultaneously treat the parent class as a black box.Hello :-), Is it not simpler to create a super-object whom all objects are children of? Something similar to the Javayeah, this was also a suggested alternative when discussing this problem previously(see the link in my previous mail).Object?