Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125461 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 1A0FE1A00BD for ; Fri, 6 Sep 2024 23:35:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1725665835; bh=BmPhqCXYHH5Tqn/gdy4Y+fPvgYqKrQx0m4Qh0OeY0Go=; h=Date:From:To:In-Reply-To:References:Subject:From; b=CoYFa0/qn3CabRolaRGipHzt7KXHxJzDchAfGKQVz0BpPnp6ZrOtSinYHVFQkCCP3 kYW40J0KSjhzOeSKNAJiUEF4bR+GHAK5MsWLAdinnlWCjRRA3izqKvO2A0nk64pnYd IOv8E3zdSmd+MucU9iSp+ee1FGjFgy8bUJtrSE5//ss7e9/pwp2uOT3gEUc99CQdRQ gazl7K4JBkg5JQCvFm749x+prFJ59fFKlEpUSk/j2XV+FluPGLG2ffqCajsrDIktep jXRPDDKQwd/d1FkUiSC0SpBap80mSU5MyypAb7NHUxcIOmg52xQOIyYtCTPaIs+SSV R0mfl/b0Q3hcg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 57236180083 for ; Fri, 6 Sep 2024 23:37:14 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh5-smtp.messagingengine.com (fhigh5-smtp.messagingengine.com [103.168.172.156]) (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, 6 Sep 2024 23:37:13 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 6ADCD1140124 for ; Fri, 6 Sep 2024 19:35:14 -0400 (EDT) Received: from phl-imap-06 ([10.202.2.83]) by phl-compute-01.internal (MEProxy); Fri, 06 Sep 2024 19:35:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm1; t=1725665714; x=1725752114; bh=uN6kW7mofPvHcMmZJVG6m YpI/2sKwfgSOJ/DDYRD7sg=; b=oZZls9JvvlQrx+r/+8q2k6aQOI+PRscNcJC48 /n6rbeWTW7XsGu6QjXM2n3i/qIsqXjwBDlUp5YYXeQGrajpYNmUxhJYpaaF9veVZ XT1gLM/p6EYwN1lV6Esp07APt9WF0AYFVFT851xcXOlP947WTKfwf9kehA1aUvzl rNG5+ytdEdBGbRya3IexFU4I3RKoxU7ACb8yIATvkav3OzV+4kdTdsH1+PpVY+Tx 9C+5Ys0qeXI6hW26e8z/tRIY+TrpTykW2NEm5+6YaJkKORupWW4tLFlCcz9LvIjO Nl7Mp4rkRGBKKq5yhEjKhPBFSwC9NCW9Q8iCNEQGMkrakT97g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1725665714; x= 1725752114; bh=uN6kW7mofPvHcMmZJVG6mYpI/2sKwfgSOJ/DDYRD7sg=; b=P Fnl356d9Udl6Mnrew4DbjlCi4SVzPx5KYYfVGVd16tTAUlH3qvCOsICt0GeYFUS1 x6+ag7W1oKJGEuyN0QJFOV0j9LpF5WZLlFceZtRPdediAWRTTvvywPu0mWQrI4WP WqaUlRB1oAlA5VfVP+ScYria8Al3TH1hs1dVzZPrFkNDXi/pnNG+1CifPS89WgGz ynfkW8jLbWXtiybA0YLWNJtmkLD7FJnyljLntiYdTajZM9ERJrdOIA16DM0VdeVC vOMaKR72b2yPeJYpVInYpvGy7WlUI/7eymR/SOrBGjGboD5GWaf4Jh7TkUqbg+Cc cAJk4AZ7HiKTVzPJOLiQQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudeivddgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnegoufhushhpvggtthffohhmrghinhculdegledmnecujfgurhep ofggfffhvffkjghfufgtgfesthhqredtredtjeenucfhrhhomhepfdfnrghrrhihucfirg hrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmqeenucgg tffrrghtthgvrhhnpeehffdvteejtedvhfetgfetheefjeeiteehfefhhefgheekteffte eujeejjefggfenucffohhmrghinhepfehvgehlrdhorhhgnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguth gvtghhrdgtohhmpdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgt phhtthhopehinhhtvghrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 03E1E29C006F; Fri, 6 Sep 2024 19:35:14 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 06 Sep 2024 18:34:52 -0500 To: "php internals" Message-ID: <79e58673-50ec-461e-a998-736b020e4287@app.fastmail.com> In-Reply-To: References: <0fa39535-f22d-4eba-b4df-90abe39e683a@app.fastmail.com> Subject: Re: [PHP-DEV] bikeshed: Typed Aliases Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Fri, Sep 6, 2024, at 6:27 PM, Rob Landers wrote: >> I suspect there's also other edge case bits to worry about, particula= rly if trying to combine a complex alias with a complex type, which coul= d lead to violating the DNF rule. For example: > > Oh, DNF is the bane of my existence with this RFC=E2=80=94I don't want= to mess=20 > this up. I'll see you at the end of the example, though. > >>=20 >> typealias Foo: (Bar&Baz)|Beep; >>=20 >> use (Bar&Baz)|Beep as Foo; >>=20 >> function narf(Foo&Stringable $s) {} >>=20 >> With the compile time approach, that would expand to `(Bar&Baz)|Beep&= Stringable`, which is not a valid type def. > > I can see how you arrived at this, but I think you may have missed a=20 > step, since the entirety of Foo will be &'d with Stringable. > > Foo =3D (Bar & Baz) | Beep > > want: (Foo) & Stringable > > expand Foo: ((Bar & Baz) | Beep) & Stringable > > Which can be reduced to the following in proper DNF (at least, it=20 > compiles=E2=80=94https://3v4l.org/0bMlP): > > (Beep & Stringable) | (Bar & Baz & Stringable) > > It's probably a good idea to update the RFC explaining how expansion w= orks. Woof. We're not "fixingup" anyone's DNF elsewhere. I cannot speak for = everyone, but I'd be perfectly fine not doing any magic fixing for now, = and then debating separately if we should do it more generally. Just do= ing it for aliases doesn't seem like the best plan. --Larry Garfield