Re: Vibe check: array shapes

From: Date: Fri, 28 Feb 2025 23:49:55 +0000
Subject: Re: Vibe check: array shapes
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-126533@lists.php.net to get a copy of this message
On 1 Mar 2025, at 00:28, Tim Düsterhus <tim@bastelstu.be> wrote: > >> Anyway, I would love to try and push this idea forward – either by contacting Kacpar, or >> writing my own RFC – and have a shot at implementing a proof of concept, but first I would like to >> get a feel for whether this proposal would find much footing here. > > I guess the pattern matching RFC could be the solution to what you are looking for and I > suggest to have a look: > > https://wiki.php.net/rfc/pattern-matching > > and > > https://externals.io/message/123701 I see! I had skimmed through it before but now upon closer inspection it does seem to fulfill some of my wishes. However, it seems the ability to actually use pattern matching as a structural interface hinges on whether it will be possible to declare patterns as types, which as of now seems to be under consideration. I may need to throw my two cents into that RFCs thread. Thanks for the heads up! Alwin

« previous php.internals (#126533) next »