Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120106 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 11270 invoked from network); 21 Apr 2023 15:35:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Apr 2023 15:35:25 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 60B591804A9 for ; Fri, 21 Apr 2023 08:35:24 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 21 Apr 2023 08:35:23 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 6AE555C0075 for ; Fri, 21 Apr 2023 11:35:20 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute4.internal (MEProxy); Fri, 21 Apr 2023 11:35:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1682091320; x= 1682177720; bh=aUDW3j7W5if01xIFHq23xvyLWE96Ci0cXhyUjNFHH2c=; b=X y2JjUnP04gQ0l89Iw38BQEaX10KnaE3EaHRwPc8czsX9a9FC73njVBiYuwhpU9Dq lcA2RYjJfjg0LQPZKn/F1T3Kdu2ClW3H0Z4/yybaRXiy6T5yyexo/p3QaZtYmZrd sPyyM3MeF+2ifsZorK+vmOahQ0TvfqZCwdps7jq0oiQgjQsTzF0VroakiA07pTMs QgOKiszyzz2ATeHdrXmWKGJ7XqAxxpB5toWYAqljDQf1W8yJUXJZpO7vuwb1e2Ib XYZ6TqtJcAb7ew1qGEMADmV32bYt6T0XITa1NaYs2cYtuKMD6Y93cboMed0dJb32 ZbJMA28lq/0nM5YLJ7vpw== 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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1682091320; x=1682177720; bh=aUDW3j7W5if01 xIFHq23xvyLWE96Ci0cXhyUjNFHH2c=; b=VLyZWZ9ICWfR3dteTuu+TYbi9Akhi oi2q8K5vZ96//0Q0R1XP+owdK1NcoVkdNYaKUadtp1+EN0HJZSrwt6KtvbSQUatT PAvFhhuebXYUVABtIOO1KxHBguavkqG4coyo5qpJwmUDNmB8JkPITGJj+VxWOQO/ JQ884cwWwMgTqvNwIQ2e6FcxBo+5bNhVFv5TTtS0Jk1ZZ0t4E8YnTDH0rQiPXPpy bq+BBWNvJKtioFbM+PUFgAOokmanokdUj27+JQgqjoLMsT799F0+K5s36I0Hl+kx C7DDiGkSo53uFgWVJjUZKvvSRGWkB8WYN0c/aqMx468yxqvp5zU0aUImA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedtgedgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeeglefgkeduiedvvdetffeujefftdfhjeeiveehgfff keduveektddvledvvdfffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 970261700089; Fri, 21 Apr 2023 11:35:19 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-372-g43825cb665-fm-20230411.003-g43825cb6 Mime-Version: 1.0 Message-ID: In-Reply-To: References: <6581c252-75c9-889d-75d2-eff5220216c2@gmail.com> <8fa3e835-41b8-4f57-aa9d-4fe0ac584766@app.fastmail.com> Date: Fri, 21 Apr 2023 15:34:59 +0000 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] Expansion of PHP Symbols? From: larry@garfieldtech.com ("Larry Garfield") On Fri, Apr 21, 2023, at 3:12 PM, Deleu wrote: > Hey thanks for the reply. I just want to go an extra mile to make my points > clearer. Please take no negative connotation from what I posted towards > Composer, PSR-0, PSR-4 or such. I was merely describing things from an > end-user perspective to bring everything I think about into context. No offense taken. A lot of people get confused about the Composer/PSR-4 relationship, and don't actually understand what Composer is doing, so I just wanted to be sure we were all on the same page, explicitly. > I feel like this all sounds too good to be true/possible because if it were > easy, it would maybe have been done by now. Even if we park function > autoloading altogether (for its controversy) and focus just on type > aliases, the question remains: Why is it not possible to make Type Alias > the same way that Enum was recently introduced? I think Tim already answered this effectively. Enums are, to the engine, classes with funny syntax. They're not a new type, they're classes with some extra machinery. So piggybacking on the class autoloading is trivial. Type aliases are vastly more complex, because they may or may not exist as their own thing, they may (depending on the implementation approach) be nestable, they cannot be used everywhere that classes can (I don't think using an alias in instanceof would actually work, but it would work with the "is" keyword that has been proposed), etc. They're a fundamentally different beast with different syntactic implications. --Larry Garfield