Re: [RFC] [DISCUSSION] Type casting in array destructuring expressions
| From: | Enno Woortmann | Date: | Wed, 08 Apr 2020 09:51:16 +0000 |
| Subject: | Re: [RFC] [DISCUSSION] Type casting in array destructuring expressions | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-109561@lists.php.net to get a copy of this message | ||
Am 07.04.2020 um 19:24 schrieb Claude Pache:
I've added a motivation section to the RFC describing the target of the proposal, added a discussion section describing the difference between the proposal and type checks while array destructuring and extended the patch section to include a description of the change. EnnoLe 7 avr. 2020 à 17:09, Enno Woortmann <enno.woortmann@web.de> a écrit : As the proposal explicitly aims at type casts when working with data from a untyped source (eg. iterating over a CSV file, XML without a XSD defining the types of the elements)I feel that the RFC lacks a section named “Motivation”.... That said, the larger question is: How many ad-hoc features do we want to add to array destructuring? For type-casting is one specific kind of transformation you may want to apply to your data. —Claude