On Mon, May 17, 2021 at 6:16 PM Mike Schinkel <m...@newclarity.net> wrote:
> > > > On May 17, 2021, at 10:50 AM, Guilliam Xavier <guilliam.xav...@gmail.com> > wrote: > > > > > > > > On Mon, May 17, 2021 at 6:58 AM Mike Schinkel <m...@newclarity.net > <mailto:m...@newclarity.net>> wrote: > > > > Casting is another interesting approach that does feel more consistent > with the existing language. > > > > Since it *is* creating a closure, wouldn't this make the most sense? > > > > $partial = (closure) abc(); > > > > Ouch! definitely NOT! > > > > $partial = (closure) xyz(?,24); > > > Mind if I ask for you to elaborate on your aversion? > > Asking for general understanding, not to debate the point. > > -Mike Hey Mike, Let me share something that's possible now and it would be pretty weird with the casting syntax: *(function (...$params) { var_dump($params);})(?, 2)(1, ?)(?, 4)(?, ?, 6)(?, 5)(3, ?)(7);* Will pass the parameter 1, 2, 3, 4, 5, 6, 7 in order to the closure that was initially defined. I think casting requires extra grouping.