Re: Blog post: If we can get partial generics, should we?
| From: | Vinicius Dias | Date: | Tue, 05 Aug 2025 16:30:50 +0000 |
| Subject: | Re: Blog post: If we can get partial generics, should we? | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128400@lists.php.net to get a copy of this message | ||
> For instance, if we had interfaces for Set, Map, etc, there are going to be operations which
> return nullable values.
Wouldn't it be implemented like this?
```
interface Set<T>
{
public function get(string $key): ?T;
}
```
I might have missed something, but this doesn't seem to be a
limitation of this implementation, is it?