Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118061 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 51640 invoked from network); 22 Jun 2022 16:22:43 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Jun 2022 16:22:43 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 74F46180545 for ; Wed, 22 Jun 2022 11:12:17 -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=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (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 ; Wed, 22 Jun 2022 11:12:17 -0700 (PDT) Received: by mail-ej1-f49.google.com with SMTP id sb34so6929558ejc.11 for ; Wed, 22 Jun 2022 11:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=xIxWjllaFXulpEhq28Ghwxi49VadxPM2X2iNdgOm3fc=; b=SoREQUaSTBwWVJlZNIRCf230/yreswjRa2yNknQj2MAiiQD+xuk7bhJE3qjOlu9g2r GNyRdG2tfHWvEKjsy2v6ywgyDoiOITUOBaHhPvFalarSv21iUx88FRSi7HZJW6LC1WAH FZhD+DWD6pHkesHsyvxXnbbJAkYUCvakxB7VkUhm+E5pShJzgWKKBbUb8gwcnYAC4HZi LflE/HswVSTWftDdtan14kOsqCMJOPvoYvq9Twr23Op7kPphfPGRxqC/yfNDwx5K/reB ALHNKqmYTOQrBvIFkw7mv/eIcCEgu1dOdDIVyA321yXsitSJdcNaU80IMsgSFXfmhwFa m8tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=xIxWjllaFXulpEhq28Ghwxi49VadxPM2X2iNdgOm3fc=; b=FcwM2+dj6FvDFOwx5QPGsM6c2rijMDhBWyYtJHq5iMBNXnj6TPW1xBpoinM2WJ1Kmi boQtRx29Sac1xtmmEmKOxSk8bTUjxhLipNQtl7Jx+jK7WSkQ1Q0YBibyhBfXJTUfcDUm vrdxNh1Cz+dGDNco2538RAo6wXgicAQf3iKFx80QUr2o5XeMYCLj5d9XNnPZzDnIvbM3 ZMhYDwxyzxu2p5Wdh6bTQimiGz8eMkddW5WR47khgEQbXgEWRLTFmBHo1PWORkXCcUe8 vq4daAjK/qlKhuKJHxSbDE0SqRVNiLr32ODfJRws35Pc6fC9V7zhTNy6mTjbu4w3M9GK NCIg== X-Gm-Message-State: AJIora+LMBB50sCkz9TcZK+lpkxAQId6qHdLbTu1ql8+9T4as76ft5Zb ugC53Vt2/WuZnLOfQLAyF8U= X-Google-Smtp-Source: AGRyM1s23LIlshi/bVsTKXVitHzq/vbIr7Y8p+TgJ4YAXbp+wrtRvVR8yGdwRZYmVsNwtLX7lSm2WQ== X-Received: by 2002:a17:907:a0c8:b0:711:d8a5:caff with SMTP id hw8-20020a170907a0c800b00711d8a5caffmr4231766ejc.43.1655921535816; Wed, 22 Jun 2022 11:12:15 -0700 (PDT) Received: from smtpclient.apple ([89.249.45.14]) by smtp.gmail.com with ESMTPSA id c1-20020a17090618a100b006fea2705d18sm9696239ejf.210.2022.06.22.11.12.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jun 2022 11:12:15 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) In-Reply-To: Date: Wed, 22 Jun 2022 20:12:14 +0200 Cc: internals Content-Transfer-Encoding: quoted-printable Message-ID: <2FB748CF-A93A-4F1F-BA8B-22D100A472D7@gmail.com> References: To: shinji igarashi X-Mailer: Apple Mail (2.3696.100.31) Subject: Re: [PHP-DEV] [RFC] [Under Discussion] Constants in traits From: claude.pache@gmail.com (Claude Pache) > Le 21 juin 2022 =C3=A0 23:33, shinji igarashi a =C3=A9cri= t : >=20 > Hello everyone! >=20 > I'd like to start a discussion on an RFC to allow defining constants = in traits. > https://wiki.php.net/rfc/constants_in_traits >=20 > I'm looking forward to your feedback, including corrections on English = wordings. >=20 > Thanks! >=20 > -- > Shinji Igarashi >=20 Hi, Some time ago, I migrated part of some class implementation into a = trait, and I was surprised that it resulted in a syntax error, because = constants were not supported in traits. In my case, I could trivially = resolve the issue by morphing the (private) constant into a static = property (semantically less correct, but pragmatically simpler); but I = was feeling that it is yet one more inconsistency of PHP: Why on earth = are static properties supported, but not constants? So, this is a welcome addition (or, rather, a welcome correction of an = oversight). =E2=80=94Claude