Re: Any interest in a list type?
| From: | Matthew Brown | Date: | Thu, 23 Apr 2020 14:16:14 +0000 |
| Subject: | Re: Any interest in a list type? | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-109812@lists.php.net to get a copy of this message | ||
>
> IIRC, they switched from object semantics to value semantics (like PHP
> arrays). Can someone more knowledgeable confirm?
>
Yes, sorry – Hack introduced the vec type (with value semantics) in 2016
after they'd experimented first with Vector (object semantics). Use of
Vector is now discouraged.
Details here: https://github.com/facebook/hhvm/issues/6451
FB/Hack appears to be in the multi-year process of moving all PHP arrays to
one of [vec/dict/keyset]. That's likely not an option for PHP itself, but
having the _option_ of a vec equivalent (in this proposal "list") would
make sense, I think.