Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126533 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 8CD991A00BC for ; Fri, 28 Feb 2025 23:50:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1740786455; bh=1vavDcc1jUc1wRHtVk/RR7hyOA4atfe4o0rh84/t3bI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=WrcY7f+4fkdboQ31FT9O3a6ymfzJDrBd5VSepNq4v9uXdiw36qrHwvEgbb9hS0Ed9 dkpDYra6olazD5DgGKxcQSsVJDhehSa9FQI9ToghHCvJHP3Tc6+DaQmSDpFmtG3kNf kgF22vNJpMXvigjmTgemCocbncQPqGPC/57T0YUZY8fva67TcJL5YSuGrZpdDn1tuq 8bxDeUa1qmosS/8ZGfF0o9ttfhMq4ZG+FbJAt7tzQZ8TRYsnHNV39If/y8A5LnEFXr dqBifP3mf0WEAz+hemssl0ckmctAUuB6Q5EDYKQCejLn/tQtr/ieInHJD2NwHiu44B TO1CO0gbyAcNg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AD7261801EF for ; Fri, 28 Feb 2025 23:47:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from st43p00im-zteg10063501.me.com (st43p00im-zteg10063501.me.com [17.58.63.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 28 Feb 2025 23:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=garsi.de; s=sig1; bh=1vavDcc1jUc1wRHtVk/RR7hyOA4atfe4o0rh84/t3bI=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To:x-icloud-hme; b=d17Yk5ZlSkYzey8f+KMtEx+95OR5sDsjmtV5tZMqteEfnl5PvZOoHbnE+M3UVUbh0 JjEMfEGq64dSmEVF8X8+96pngjHyn0VsBygFMOeO8sbzRutjOuymQHMm2vcNy614pI TcZzKZoxZ0Zm+aPyf9wM20QetSOLQ3rym2oK3nPZxM2hzQ+74EO1Dqb2VOA9/kDQOO eP2NBrcPCTaZdkDqsN0SSFKTIfwXvvy9JQ9l1OMGpHfBeBCQ93rCZBY7LKFUHR0N95 RCmQTW8dyab8VJ7Dx3h6wpQCrWABg4wXR5TVjxHIuxcEp0I7+TIBeknO8SqCajE9/I w2o3LnZ6sdocA== Received: from smtpclient.apple (st43p00im-dlb-asmtp-mailmevip.me.com [17.42.251.41]) by st43p00im-zteg10063501.me.com (Postfix) with ESMTPSA id DD644980430; Fri, 28 Feb 2025 23:50:08 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\)) Subject: Re: [PHP-DEV] Vibe check: array shapes In-Reply-To: <1eeaf0c3-9072-403f-a556-e8c31db1a9a7@bastelstu.be> Date: Sat, 1 Mar 2025 00:49:55 +0100 Cc: PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <81F87FFD-91EF-4FDF-A929-9BE1CA08AA1E@garsi.de> <1eeaf0c3-9072-403f-a556-e8c31db1a9a7@bastelstu.be> To: =?utf-8?Q?Tim_D=C3=BCsterhus?= X-Mailer: Apple Mail (2.3826.400.131.1.6) X-Proofpoint-GUID: WlOglwlUvV8rv7EDkf3d40sa6wo7v2Ob X-Proofpoint-ORIG-GUID: WlOglwlUvV8rv7EDkf3d40sa6wo7v2Ob X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-02-28_07,2025-02-28_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 phishscore=0 clxscore=1030 suspectscore=0 mlxscore=0 adultscore=0 mlxlogscore=644 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2502280175 From: alwin@garsi.de (Alwin Garside) On 1 Mar 2025, at 00:28, Tim D=C3=BCsterhus wrote: >=20 >> Anyway, I would love to try and push this idea forward =E2=80=93 = either by contacting Kacpar, or writing my own RFC =E2=80=93 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. >=20 > I guess the pattern matching RFC could be the solution to what you are = looking for and I suggest to have a look: >=20 > https://wiki.php.net/rfc/pattern-matching >=20 > and >=20 > 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=