> [1] In fact if the right hand side of with may be an expression that
> evaluates to an array, folks wouldn't need to learn new syntax at all:
>
>     $newProperties = [ "foo" => "bar" ];
>     clone $object with $newProperties;
>
> and
>
>     clone $object with [ "foo" => "bar" ];

in my opinion this is sick, as in awesome. the {} version makes no sense to
me unless the language gains $var = {} ; to skip $var = (object)[];

Reply via email to