Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120930 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 21442 invoked from network); 23 Aug 2023 21:28:58 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Aug 2023 21:28:58 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9D5D81804AA for ; Wed, 23 Aug 2023 14:28:57 -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,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 out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 23 Aug 2023 14:28:57 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 9DD3B5C01BD for ; Wed, 23 Aug 2023 17:28:56 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute4.internal (MEProxy); Wed, 23 Aug 2023 17:28:56 -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=fm1; t=1692826136; x= 1692912536; bh=M1yzY5TUfs4FR359zwceDeQO+IvWPw1mQqXsWCxR6dA=; b=i ihVqjEag1AW/GKGQNN31p+xj9A+rN3uqZuUVk8pgCvoEugsT6nwQxUI71UMmn/mI MNxR5lqFQa02aMWH485TJFyMEJFCe2pyfl3smFYT2n2FuC9tpoK8u9vgAhdPi3Oj /3ffWssWP9LPOZ9hKivxZluRqbo/rJOSRn/x8nMz8kojAkBBYsdMLhjcd0905Jdx mTNOEPXP92GIgv9+lp093jluFhOOA0nktn0JuM8fbonu2VZs+iZXq7ZWJDZ8ZCyt fhSe7mVT6Yal88kS3Md5n2fI6w3GugIRZTwUgIkCGCTRX0cpL0V4A0J7jKbTHE0b TWWQYcRN4jurGMju5QmOw== 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=fm1; t=1692826136; x=1692912536; bh=M1yzY5TUfs4FR 359zwceDeQO+IvWPw1mQqXsWCxR6dA=; b=mTwvc2fcD+aCFTRs23IIWn8s0ojc4 EEEi1rwJo47H/E89mX3opiXUIOMn6IZF8RFfdbaPkjuQI5uNejhB8eTbni6qBOxD Ogp8hcZ81xj4NUw/zv4wE3LvDfeq2LeJVJucJfaEtMYYK0NzBYV5Mtrk8OpUOt1l H/VRioYRAlsWQFdF92plsPy59FnHngDvdHd7F4AD9uQpl86y2wNmt3qDyI65Wxld w4n4lsQHr86tXdu9BWZl1in09aNFPV2rAEJVuGY+zQ4juz3KHayKSBYQ7k4aOMW3 ZOyqSSgTV2jF8wTkSifQzOP7WKg2JPy+Nwzx6eFUGCptQzHeCZq1iLy6g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddvgedgudeiudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderreejnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnheplefhjeduueegudeghfehudfgvdeflefffeeuteev uedtjeffkeetkeeiveejkefgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 3D5651700093; Wed, 23 Aug 2023 17:28:56 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-647-g545049cfe6-fm-20230814.001-g545049cf Mime-Version: 1.0 Message-ID: In-Reply-To: References: Date: Wed, 23 Aug 2023 21:28:35 +0000 To: "php internals" Content-Type: text/plain Subject: =?UTF-8?Q?Re:_[PHP-DEV]=E5=9B=9E=E5=A4=8D:_[PHP-DEV]_Replace_ugly_attrib?= =?UTF-8?Q?ute_token_#[]_to_other?= From: larry@garfieldtech.com ("Larry Garfield") On Wed, Aug 23, 2023, at 9:10 AM, chopins xiao wrote: > but still ugly writing, now recommends using exceptions instead of > errors, so should be deprecated error control > now PHP already uses a lot of combine marks (more than 30), All marks > on the keyboard are already in use > just as Dung-Mountain-Code > > > > Regards > Chopin Xiao I assume there's a language barrier issue here, since I do not know what you're talking about. Exceptions vs Errors has no bearing on the syntax used for attributes in any way. In practice, #[] has proven itself very useful. "Ugly" is a subjective question, but I find it quite readable. Rust uses the same syntax, as well, which is what inspired it. It also took many weeks of discussion and debate to arrive at this consensus. But regardless, there's now tens of thousands of lines of code in the wild that use the current syntax. Changing it now is virtually impossible, even if everyone here agreed that it should be done. So, like it or not, PHP attributes use #[] and will continue to do so. --Larry Garfield