> Le 19 janv. 2023 à 09:01, Máté Kocsis <kocsismat...@gmail.com> a écrit :
> 
> Hi Everyone,
> 
> As discussion apparently stalled, and since we managed to update the RFC
> with the recently brought up arguments, we would like to start the vote
> soon, possibly early next week, unless someone finds a new topic to discuss.
> 
> Máté
> 

Hi,

One shortcoming around readonly classes that I just figured out, is that it is 
not possible to use them as anonymous class:

```php
$c = new readonly class { }; // parse error
```

While it does not makes sense to have `abstract` and it is not useful to have 
`final` in this position, on the other hand, it is perfectly reasonable to have 
readonly here. (This is especially problematic in case we keep the limitation 
that only readonly classes may extend readonly classes, because in that case, 
an anonymous class could not extend a readonly class. However, this is an 
orthogonal concern.)

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

Reply via email to