Hi! On Tue, Sep 29, 2026 at 8:45 PM Weilin Du <[email protected]> wrote: > > ``` > $point = [:$x, :$y, :$z]; // ['x' -> $x, 'y' -> $y, 'z' -> $z] > ```
To be honest, I'm not a huge fan of quirky and tricky perl-like syntaxes in languages, but in general I think I personally would like such a feature for exactly one purpose: to cast DTO's to arrays if this feature also supported [=$this->id, =$this->name, ...etc] (or replace $this with any other object). This would allow to constrain key-names in resulting arrays to reflect exact names of properties of the class. But according to your current version of RFC, it is not the case. Is there any strong reason to not support such behaviour? Regards, Alexandr Egorov.
