Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123407 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 4B4EB1A009C for ; Thu, 23 May 2024 00:31:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1716424318; bh=ysyit4j6aHITNkHUdfOlvbDLW8qHYGUsDsWl8HgBC5w=; h=From:Subject:Date:References:Cc:In-Reply-To:To:From; b=Qtc39YoFtsIHgmxj0O3QnoQjI4r9kyKVpKam90veNO1w0SM36sCYeefVBuhoqZH2e hEvs54CdsBg6paLcHU5vYB4pk1efys1aP/R11Ds2gUJNGMQ5zrVGGPSGQ/oodO3jf9 JMIa9w5DpZvQXOgdMOHiA1jPeWFlun74PGmKuVaIw8rddZVzi7aQYhiqtwxMpIPCzr vArzD0lLJPq7McFcEjRFDEtyq3t1WPgRrVp6DVwRvqj7576nY8kV0nu8As93bWbjHl GEBfCowz29VhfSPbqKjMmvkoH58uvG4PkbHkx9r/sker/1hjXa46oVVqt8sFCj39nj zP3uphByplvKA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2B58018003B for ; Thu, 23 May 2024 00:31:57 +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.8 required=5.0 tests=BAYES_50,DMARC_MISSING, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail1.25mail.st (mail1.25mail.st [206.123.115.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 23 May 2024 00:31:56 +0000 (UTC) Received: from smtpclient.apple (unknown [49.48.221.238]) by mail1.25mail.st (Postfix) with ESMTPSA id E7E84604E4; Thu, 23 May 2024 00:30:53 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net Mime-Version: 1.0 (1.0) Subject: Re: [PHP-DEV] [Discussion] Implicitly backed enums Date: Thu, 23 May 2024 07:30:40 +0700 Message-ID: <4BF0CC62-09A0-4147-A9C1-F0914B31A4B4@koalephant.com> References: Cc: php internals In-Reply-To: To: Larry Garfield X-Mailer: iPhone Mail (21F79) From: php-lists@koalephant.com (Stephen Reay) Sent from my iPhone > On 23 May 2024, at 03:58, Larry Garfield wrote: >=20 > =EF=BB=BFOn Wed, May 22, 2024, at 2:29 AM, Stephen Reay wrote: >>>> On 22 May 2024, at 07:58, Larry Garfield wrote= : >>>=20 >>> given that the casing for an enum should be CamelCase (per PER-CS) >>=20 >> Hi Larry; >>=20 >> I find myself yet again having to ask that php policies/discussions not >> revolve around the idea that PHP-FIG is a required/expected part of PHP >> usage. >>=20 >> Until a PHP RFC specifying "proper" casing for userland enums passes, >> can we leave the claims about what they "should be" out of discussions >> about language/stdlib functionality? >=20 > 1. The status quo in the ecosystem is relevant to language development. FI= G is a part of that ecosystem. "Everyone in Laravel does X" or "this would b= reak Symfony which does Y" are also a relevant observation to make, though i= n neither case is it a binding dictat, of course. By a similar token, the l= anguage doesn't require class-per-file, but the de facto standard for virtua= lly every project that isn't WordPress is to use class-per-file for autoload= ing. It would be highly stupid of us to ignore that fact when discussing au= toloader improvements. >=20 > 2. The Enum RFC used PascalCase. The PHP maual uses PascalCase. We're al= ready recommending PascalCase as the standard for enum cases. >=20 > Those who aren't following that recommendation are, from what I've seen, u= sing ALL_CAPS. Meaning using lower_case is NOT typical, and thus the issue I= mentioned (that automatically using the case name as the backing string nam= e may not be all that useful) is present either way. >=20 > --Larry Garfield >=20 Hi Larry, I didn't say the community or common uses should be ignored. I just asked yo= u not to use the phrase "X should be Y because of ". It suggests authority where none exists. Cheers Stephen=20