Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126272 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 D2A5B1A00BC for ; Sun, 2 Feb 2025 14:35:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1738506771; bh=IOLZ8fUf+ZLDNL/l4rcxeZN7bbujwjAzTivbNRjE+eg=; h=Date:From:To:In-Reply-To:References:Subject:From; b=cj38BLtCPzDE04Ke2Uzee2qIAhRCtPg3R6AI3Dxrtw5v2RUSkvuw9dRzuFw+vCMpD BCJSDuwaJb3B30Ok5gGYv/DA7H1CtFw0YX5/Ijde0AHmlE9zp8oKYPKuwR+hmYO+3n g63OqOYFgcmNFsXw8ggAlxA+6eAN5GqEyhoEKj5ysVIkDybXVJxvhEYlTzvRyb/zp5 M05WbvYHM83TXAviU/ZwDFFnKikShD6uZ2IXwJL5qeMV7xgLdLWRdDPCu2mD/a1pzt ZBVL5oishoW+LdzgONaI2+NF8YgLIVOTKMX69xbz/grWxoiwy4kMJtxKpKLCS1Nm6Z TWVHiddYQesEQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CB6D718007F for ; Sun, 2 Feb 2025 14:32:50 +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=-1.4 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-b2-smtp.messagingengine.com (fhigh-b2-smtp.messagingengine.com [202.12.124.153]) (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 ; Sun, 2 Feb 2025 14:32:50 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id AA9AB25400CC; Sun, 2 Feb 2025 09:35:34 -0500 (EST) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-01.internal (MEProxy); Sun, 02 Feb 2025 09:35:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc: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=1738506934; x=1738593334; bh=IOLZ8fUf+Z LDNL/l4rcxeZN7bbujwjAzTivbNRjE+eg=; b=cTay1nPu1BJj/L94Bmz+aWgz+Q DWj2jNfn5NtXbu141hq1MfMcaDmPnjz6szEFF8a8Pjdo8XJRs/4f9LN4O3VZcB3c ege2IFU1yDrPExBChFt9Yd+2qNIl7dRoM0uctImQWmWP1wtVFH2ElzQxtKQ848l+ fkFyOhlJv4rKifCEOgxulXoU3y0AXmqgKzJ1WLnF8BctWKhfBSMUsybzDJT+9kSM ID64P77KgL/8pQPZ+epFDkR7DmhiG8mz3QI6LR56woOixRyrb4q4xFjXlDNQzANE AXtTrQ2EZYOj5vD2X6IqEjWpMFOdppKf2t0K81wnME94wWEFH52x9+3LfJ9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1738506934; x=1738593334; bh=IOLZ8fUf+ZLDNL/l4rcxeZN7bbujwjAzTiv bNRjE+eg=; b=xDynWkUQo82UvISIYFXbczE2fxtHU2PaXatL5uCSCAhcUobelWY BHNWaL3ZGQgqOa/odvGm5f0TUn7THTJ9I3QOngE0AfCmTzVBFN402mba9n9QIoSD BvHYVi2VZR3x71HEc1GqB7TH+J4TV0FrRYwmUJojD47YteWmOmfi51UBF5QQCwoj eFywvLEL5lSbv8n6j+a9Zjp7+tpg/2YsjVLEBAFDhpiOmI6zt7vvTPfWZK3A2WZL l+1jkNji8vmExVth3r85UL3xewh+lEJhtCDiFlHZoSCWEFuXaWVN9oouUy27quxE 6f9FgJJkJjRkcAQ/sX9s0WdEjCxgmCu+UDw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugeelfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefoggffhffvkfgjfhfutgesrgdtreerredtjeen ucfhrhhomhepfdftohgsucfnrghnuggvrhhsfdcuoehrohgssegsohhtthhlvggurdgtoh guvghsqeenucggtffrrghtthgvrhhnpeetueeltdfhjeduvdeuieejhffgveekvdfggedv teeufefhtdekgfetjedtveekjeenucffohhmrghinhepphhhphdrnhgvthdpghhithhhuh gsrdgtohhmpdgvgihtvghrnhgrlhhsrdhiohenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehrohgssegsohhtthhlvggurdgtohguvghspdhnsg gprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehtihhmsegs rghsthgvlhhsthhurdgsvgdprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsthhsrd hphhhprdhnvghtpdhrtghpthhtohepvhholhhkvghrsehtihguvgifrgihshdqghhmsghh rdgtohhm X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 0D2E7780068; Sun, 2 Feb 2025 09:35:34 -0500 (EST) 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: Sun, 02 Feb 2025 15:35:12 +0100 To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= , "php internals" , "Volker Dusch" Message-ID: <9d2d54af-f705-4c74-baae-d05d09a1f1e9@app.fastmail.com> In-Reply-To: <2eba1ea4cffa751e6a5f325b972e86b5@bastelstu.be> References: <2eba1ea4cffa751e6a5f325b972e86b5@bastelstu.be> Subject: Re: [PHP-DEV] RFC: First Class Callables in constant expressions Content-Type: multipart/alternative; boundary=11b5913472af417381ffcc76d836e4fc From: rob@bottled.codes ("Rob Landers") --11b5913472af417381ffcc76d836e4fc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, Jan 22, 2025, at 15:35, Tim D=C3=BCsterhus wrote: > Hi >=20 > Volker and I would like to start discussion on our RFC to support "Fir= st=20 > Class Callables in constant expressions". >=20 > Please find the following resources for your reference: >=20 > - RFC: https://wiki.php.net/rfc/fcc_in_const_expr > - Implementation: https://github.com/php/php-src/pull/17213 >=20 > - The related "Support Closures in constant expressions" RFC:=20 > https://wiki.php.net/rfc/closures_in_const_expr > - The "Support Closures in constant expressions" discussion:=20 > https://externals.io/message/125872 >=20 > Best regards > Tim D=C3=BCsterhus >=20 Hey Tim, My only concern with the RFC is something a bit silly. If I understand c= orrectly, this will be a constant expression: fn(string $foo) =3D> print $foo But this will not: (fn(string $foo) =3D> print $foo)(...) despite them both basically being the same thing. It is an incredibly small inconsistency (imho), but other than that, shi= p it. =E2=80=94 Rob --11b5913472af417381ffcc76d836e4fc Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Wed, Jan 22,= 2025, at 15:35, Tim D=C3=BCsterhus wrote:
Hi

Volker a= nd I would like to start discussion on our RFC to support "First 
Class Callables in constant expressions".
Please find the following resources for your reference:
<= /div>

- The related "Support Closures in constant expressions= " RFC: 
https://wiki.php.net/rfc/closures_in_const_expr
- The "Support Closures in constant expressions" discussion:&nb= sp;

Best rega= rds
Tim D=C3=BCsterhus


Hey Tim,

My only conc= ern with the RFC is something a bit silly. If I understand correctly, th= is will be a constant expression:

fn(string= $foo) =3D> print $foo

But this will not= :

(fn(string $foo) =3D> print $foo)(...)=

despite them both basically being the same= thing.

It is an incredibly small inconsist= ency (imho), but other than that, ship it.

=E2=80=94 Rob
--11b5913472af417381ffcc76d836e4fc--