Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129739 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 lists.php.net (Postfix) with ESMTPS id A74FC1A00BC for ; Tue, 6 Jan 2026 04:20:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1767673259; bh=VhLievY+3jikwVxKCqC4LML2VQBFgAwmcmo+7CQ1apY=; h=References:In-Reply-To:From:Date:Subject:To:From; b=Z5mLiHodXyrl32QJ88ghFowigcB24/dfjufpWSWVmVbHgtY6aJK+x/AB6fCTrvrXH NbcS7ngiaqKu+77yzACeOQcmfOH7/hzzjObCWpJJamMHBkm8uEDr4bWwGvstWicdk9 Enw0Ms5CZ8uWpLRM4csqFUEHzCVvWr4xyZEBhn+9V1b0rMrj+HLbzHt0bJaAvSqUgd efvlfx7xs2l01BZ4EO+ykq9Zo+rh+RUkD13uFnX0a6c13ttd5vYrRBK743bKNPBPto DZf4vGD//WbeNSnQKT/4b+Qy79WMnh1K8VXx532+tlFXoc/uiE+SQeSKsnUz3kopo6 28kCstQRpG1Gw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 14D1A180053 for ; Tue, 6 Jan 2026 04:20:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,HTML_MESSAGE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-yx1-f44.google.com (mail-yx1-f44.google.com [74.125.224.44]) (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 ; Tue, 6 Jan 2026 04:20:57 +0000 (UTC) Received: by mail-yx1-f44.google.com with SMTP id 956f58d0204a3-644798bb299so499477d50.3 for ; Mon, 05 Jan 2026 20:20:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benramsey.com; s=google; t=1767673252; x=1768278052; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=JJ3/8PsOH/l92qIxN5BPMUayKaiEyPu9EBs2siSOlQw=; b=NjLGz4c4RHLFUkgOfvcyR3hggYnB7PPPEcILyuDzsnmn73zJgDfCnLYBO1UFJcxjlH dCgAfxu3YaNtHuHuiMSqFy05e0PYtSc61rPcGLbKlDNQLKillp1TYfxA449UFGl/V6St +lj6mJdL81JQqWNTVnFriVTI+SIPfeH0yEgXLXhGxkpyX5WE8rXI6E50vrzGHw/gAqxz 6RadJi1AHFkSLsDaqY0N135XhRHG4UGsguQkHQBafDXVMlFok/gXyZtn/5nkIuaJqP5G 6q464XFDytNBtxZJmQSnwVlLleknCUIqAPk6EDxRIWmWb0Z0Qi06rbemZLO8mtbyVcz2 6umA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767673252; x=1768278052; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JJ3/8PsOH/l92qIxN5BPMUayKaiEyPu9EBs2siSOlQw=; b=CsUP+Jp2AUZeiE6t9SpQTEJy3JaJWGAzPO18SfVcE+syploKgk7Ho/Pt53a0ONV6on sj183w6gw+eoU8prkIAL1gxKA3fgh7HTogh2EjSQeYtY7gBmq4jf/4TRab3ag0tif7bL nQNgM5kSAp5zSAPxzkmcX6U4XHxrPccA41/r3pqqmOfvt86H4J8I67xSlLc3MMo//H9G YPRjtTkwjHhQDKAJB2GSh+SYP0OpBJtdywBoDCRmbBkt+/qm3F5thgAxfukxAyuO5nqW esylJqKWjIV19sPDZnADIWqa4OTdyTnKF+Ilb+MZchIl91wCXaRmxjreXMFdzO3u4rmg iUZA== X-Gm-Message-State: AOJu0Yxfve9ouslcIp4P1ElYuo2qlad1r7usuuQvj9VCbWMjjL90sTOq OvRmEVAEG+OVSczVqGjsHLYInaehwQtaWExi3nNgQsziIHYp6Ox7iwMCmFr2oeiWJRbBee8TyIt oAu4ghVKZCscVgu+a11CO/ESxCC1SL1tBd5KNxtER8s67RbADPLTeRA== X-Gm-Gg: AY/fxX7c/zvpZ7Pizq71lEDmLZZki3eDpHpRrk6KCw9yYr3wA3HV5OZVtstPuqoGAkE /CDVECLQX+FSyKKVtWBcPSIGgygP0J8a16+0+RNKqwmjlhfrTqbv4O5oMvAcLKS4JWk7kSYKc1L HlgTkwNQUIpmh4oTcL3N7Ga/NN5de1rcIolAoRvfwLrxn4muK1lkvYagl68ZCr9e39G0Ncq2fd0 KgGmufAVIXRHa8AGyva2KsqnORW0Yho9+p60CkbEtviyNqg4W9Y8CjaoUltMBDK/lzZayY= X-Google-Smtp-Source: AGHT+IGBFQtD3lsYY6HWoX9wYL+lA+sMUtQ8c3efXWOI9hVCuJ4JNpi80L1ucW7RKG3LS4hYzF9nlbpCFEhFLb+aIzE= X-Received: by 2002:a05:690e:168f:b0:63f:bdfa:666 with SMTP id 956f58d0204a3-6470c8646d9mr1580436d50.27.1767673251571; Mon, 05 Jan 2026 20:20:51 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 5 Jan 2026 22:20:40 -0600 X-Gm-Features: AQt7F2pTDZVgza0MDqvfu-Sd21K_uTEsnAgI3rDmS3iSesRZVfnGc3joBH4pYy8 Message-ID: Subject: Re: [PHP-DEV] Request for RFC Karma: "use-from syntax for namespace use declarations" To: PHP internals Content-Type: multipart/alternative; boundary="0000000000003d388c0647b080ec" From: ben@benramsey.com (Ben Ramsey) --0000000000003d388c0647b080ec Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jan 5, 2026 at 17:28 Ilija Tovilo wrote: > Hi Stuardo > > Sorry for the late reply. > > On Tue, Dec 30, 2025 at 5:25=E2=80=AFPM Stuardo -StR- Rodr=C3=ADguez > wrote: > > > > My name is Stuardo Rodr=C3=ADguez, and I would like to request RFC karm= a to > publish an RFC on the PHP wiki. > > RFC karma was granted. Good luck! > > > I have prepared an RFC titled "use-from syntax for namespace use > declarations" which proposes an alternative `use` syntax that improves > readability by placing imported symbols first, followed by a namespace > prefix introduced by `from`. > > > > Example: > > ```php > > use ClassA from Vendor\Package; > > use {ClassB, ClassC as C} from Vendor\Package; > > ``` > > > > This is syntax sugar equivalent to existing imports: > > ```php > > use Vendor\Package\ClassA; > > use Vendor\Package\{ClassB, ClassC as C}; > > ``` > > I think such a proposal will have a very hard time passing. The > existing syntax is obviously well established as it has existed for > almost two decades. The alternative syntax doesn't immediately seem > better, other than being different (and probably closer to JS). > > You'd need to make a strong case about why this new syntax is > necessary (though I don't personally believe there is one). > > Regards, > Ilija Another thing to think about is that PHP doesn=E2=80=99t have the concept o= f modules, and the `use` statements aren=E2=80=99t importing anything. They a= re essentially declaring aliases. In working with other programmers new to PHP, this has been a major point of confusion, since `use` doesn=E2=80=99t behave like importing in JavaScri= pt or Python, for example. I think this new syntax will lead to further confusion because it makes namespaces seem even more like modules. Cheers, Ben --0000000000003d388c0647b080ec Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Jan 5, 2026 at 17:28 Ilija Tovilo <tovilo.ilija@gmail.com> wrote:
Hi Stuardo

Sorry for the late reply.

On Tue, Dec 30, 2025 at 5:25=E2=80=AFPM Stuardo -StR- Rodr=C3=ADguez <str@maphpia.com> = wrote:
>
> My name is Stuardo Rodr=C3=ADguez, and I would like to request RFC kar= ma to publish an RFC on the PHP wiki.

RFC karma was granted. Good luck!

> I have prepared an RFC titled "use-from syntax for namespace use = declarations" which proposes an alternative `use` syntax that improves= readability by placing imported symbols first, followed by a namespace pre= fix introduced by `from`.
>
> Example:
> ```php
> use ClassA from Vendor\Package;
> use {ClassB, ClassC as C} from Vendor\Package;
> ```
>
> This is syntax sugar equivalent to existing imports:
> ```php
> use Vendor\Package\ClassA;
> use Vendor\Package\{ClassB, ClassC as C};
> ```

I think such a proposal will have a very hard time passing. The
existing syntax is obviously well established as it has existed for
almost two decades. The alternative syntax doesn't immediately seem
better, other than being different (and probably closer to JS).

You'd need to make a strong case about why this new syntax is
necessary (though I don't personally believe there is one).

Regards,
Ilija


<= div dir=3D"auto">Another thing to think about is that PHP doesn=E2=80=99t h= ave the concept of modules, and the `use` statements aren=E2=80=99t importi= ng anything. They are essentially declaring aliases.

In working with other programmers new to PHP, = this has been a major point of confusion, since `use` doesn=E2=80=99t behav= e like importing in JavaScript or Python, for example. I think this new syn= tax will =C2=A0lead to further confusion because it makes namespaces seem e= ven more like modules.

C= heers,
Ben

--0000000000003d388c0647b080ec--