Yes! Though I don't necessarily think they need to be genericised (e.g. list<int>) in the language itself – just having those alternate datatypes would, I think, be a boon to the language itself – with list (a subtype of array) more useful to me than dict.
On Sat, 18 Apr 2020 at 10:51, Sebastian Bergmann <sebast...@php.net> wrote: > Am 21.01.2020 um 22:21 schrieb Matthew Brown: > > What if we left the array type alone, and instead focussed on "list<Foo>" > > type and "dict<string, Foo>", "dict<int, Bar>" types? > > > > That would allow a clear break from previous behaviour, and would allow > you > > to introduce other changes (e.g. removing string -> int coercion for > > numeric string keys). > > Just to make sure I understand you correctly: are you proposing new data > structures, names list and dict, in addition to array that can bring more > specific / strict semantics? > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >