Re: Proposal: AS assertions

From: Date: Tue, 19 Mar 2024 18:11:59 +0000
Subject: Re: Proposal: AS assertions
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-122694@lists.php.net to get a copy of this message
Hi Marco On Tue, Mar 19, 2024 at 7:04 PM Marco Aurélio Deleu <deleugyn@gmail.com> wrote: > > > On 19 Mar 2024, at 14:51, Ilija Tovilo <tovilo.ilija@gmail.com> wrote: > > > > Hi Robert > > > >> On Tue, Mar 19, 2024 at 5:24 PM Robert Landers <landers.robert@gmail.com> > >> wrote: > >> > > See > > https://wiki.php.net/rfc/pattern-matching#throwing_alternative. I > > believe this idea would combine nicely with pattern matching. It has > > many more uses there than just simple class type matching, and could > > even be used for things like destructuring. > > That looks like a PHP dream. Has there been any work regarding that? https://github.com/iluuu1994/php-src/pull/102/files The implementation is mostly complete (it might slightly diverge from the current specification. Bob has called for a different implementation approach that might be more complex but potentially easier to optimize, I'll have to play around with it. There are also still some design decisions that we aren't completely sure about. For now, Larry and I are just trying to get property hooks over the finish line. Ilija

« previous php.internals (#122694) next »