I'm not a voter nor part of the internals, but I'd say "yes", for sure.

One thing that came to mind while reading the article (keep in mind
that I don't have any knowledge on the internals of PHP, so if it's a
dumb question, sorry about that):

Would it be possible to transform (in compile-time), the first option
(that isn't supported) into the second one?

```
// Turning this:
$blogPostRepository = new BaseRepository<BlogPost>();

// Into this:
$blogPostRepository = new class extends BaseRepository<BlogPost> { };
```

If this is possible, although I know it's not ideal, it would allow us
to have that syntax and we wouldn't need to manually create "empty
extending classes".

Reply via email to