Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118056 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 39878 invoked from network); 22 Jun 2022 14:41:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Jun 2022 14:41:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 39476180545 for ; Wed, 22 Jun 2022 09:31:29 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) (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 09:31:28 -0700 (PDT) Received: by mail-yb1-f172.google.com with SMTP id t1so31110870ybd.2 for ; Wed, 22 Jun 2022 09:31:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6lcJUZk0ebLf0xj2DjUPEGGUbTyMKjw0cOuyBz2Otgk=; b=qcJmd9TPf3vsA7rwM7ipCRxby5CNG1E4CIBT2x5XMeAilQy9P27o4imAJU/wZnq7t3 JTAP98bl7gwQGbmr8yy7uw/dO+brPiV0M1BFNlHjRMIXFcxFnP6eZSRKU2ltfZZ766k1 M1niExxLwfmSBZbr2cyjKukz++9Pr7hYzMiS1iHbbtZGkhnMoqSbAl3lxRcOtfyE+z2H cyV35ZB/IDzrnVPABC3p/JW2+vXRU+RJTs3Qrr3WqB+R/qSXokENfzt8nUFyF6KKfef3 uIktU8/leSQkkb3ruJwoRJDqSPEWhZT3F2BpT4H0orJTC8FSVahhLI4h4qCm8Zp/cK4c NdBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6lcJUZk0ebLf0xj2DjUPEGGUbTyMKjw0cOuyBz2Otgk=; b=7PrhbEjOmr/s2D3+rdXpBXnB623Wi59o2yk5HUXD+Ti3V9FGTqgcigG386b+CWN9CE 4/fkwhZdf8oiXWzA2kPGxRKrpXWwvO1Q5Ftvz5pk5/BZvQDruFX3nPpxQiWISOoyySyW HzMw9H5aesTbj4VcDtk9CJjOWx9k9gtOL8QKdTI9vxDjc7Hdmf1x/zAq5uZ0mD0H9jqD mYonHEXLjC4UAkxHpH/hF4ob+O/CRaeYsSQP9wbziKcMcyKS0ACfG7GmnzmPbeRmLFbX blliZan5Cf70Z+rNQOVZlKcun5gsfP8nMtOxPY8il/cDc1zR+PHvk7vo7dtcfDftH/TN +JCg== X-Gm-Message-State: AJIora+FbD3+SrjRxA41+JLz+I4CHIDcGmNPA5uB2pnYLZr20AhwtWOu tfxG9BFSEsZEwUQF5S3AAcNJ0DeDGMQ7/eY8p0g= X-Google-Smtp-Source: AGRyM1um1ONWXaknrfOVSRR4zZNynP+V+wC+Iuty2SIs1A7r3+yeZAlmyEMsj1ZEBrSR8UKd43P9NJiOkGzWY1xMAXY= X-Received: by 2002:a25:9d89:0:b0:669:31d4:7cd9 with SMTP id v9-20020a259d89000000b0066931d47cd9mr4702556ybp.294.1655915487875; Wed, 22 Jun 2022 09:31:27 -0700 (PDT) MIME-Version: 1.0 References: <029d3b2e-e8d3-41d0-acc9-7f7514651030@www.fastmail.com> In-Reply-To: <029d3b2e-e8d3-41d0-acc9-7f7514651030@www.fastmail.com> Date: Wed, 22 Jun 2022 18:31:16 +0200 Message-ID: To: php , shinji igarashi Cc: php internals Content-Type: multipart/alternative; boundary="0000000000006ed6dd05e20bdea0" Subject: Re: [PHP-DEV] [RFC] [Under Discussion] Constants in traits From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --0000000000006ed6dd05e20bdea0 Content-Type: text/plain; charset="UTF-8" > > > > I'd like to start a discussion on an RFC to allow defining constants in > traits. > > https://wiki.php.net/rfc/constants_in_traits > > > > I'm looking forward to your feedback, including corrections on English > wordings. > > > > Thanks! > > > > -- > > Shinji Igarashi > > I am initially lukewarm. One thing not addressed in the RFC that should > be: Why were constants left out of traits previously, and what has changed > to make them make sense to include now? (I don't recall, honestly, so I > have no strong feelings one way or the other yet.) > That! I'm also wondering why the default value of a const (and a property) could not be changed by the class importing the trait? This sometimes hits me and the original RFC doesn't explain why this is needed. I added Stefan Marr in the loop in case he still checks this email address and would like to shed some light on those questions. WDYT Stefan? And I'd also be happy to see an implementation of this before voting, to be sure this is something that can be achieved without too many troubles. Do you think this is possible? Cheers, Nicolas --0000000000006ed6dd05e20bdea0--