Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117448 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 20347 invoked from network); 30 Mar 2022 03:06:55 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Mar 2022 03:06:55 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 68B021804E3 for ; Tue, 29 Mar 2022 21:35: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_40,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-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 29 Mar 2022 21:35:16 -0700 (PDT) Received: by mail-ej1-f44.google.com with SMTP id bg10so39050252ejb.4 for ; Tue, 29 Mar 2022 21:35:16 -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=W1qVJwVmtV4qQoV4XB3UUegrIR5/yczuuzkmXEbQPF8=; b=Te2bxm8Rd1zrSRCGhPqSBWRbcDlQVDQfhpsXdg5SVun4sohyO7e0FHWHkjECJYGmb1 lESjZpz0O3ZuAk+LGkMnKBsDyQ0TGIwhXCCo99DoalDoxRiBh4M9H7h2vZyS2F+LY1Gv 31W27K04Dl4AJcb16SQUSi+2baudXLifSk5pn46q6aO/DeDhkEJFM+qlO6J6PkZOjnQY KRJ9EghJ903g4xAhwSeiKwW9y5hpPqQ16Q2gMqM8IqT75iqO6xbzRQG6+vQGJW2SyyrO EN5LQU+KJpjy0eZ4W4XJtmHh/P+zGRLtwfmdKiIUSY9rZinBUgADOTlDPxYwrfQwOURi p2IA== 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=W1qVJwVmtV4qQoV4XB3UUegrIR5/yczuuzkmXEbQPF8=; b=Az+gO4WvZDcM7upPlwL0P4obCww5K+6/I7Gzqw4GbTr7l9mhhYbqzFzTY7k1vk2iJL n+wCgJSS1yaET0ntLngoPO/sad9tF9M8avnW5WABPf4wJQUFvprVFkGbdyvPFek1VJBd xd/hDd2EDdudYpIF47dmN5f8kHp6IJ6DvuaZrcsBs7gRF+7tjWfM+27RG5Bc6j1rFi1k eVuwynB5JXlnBV6ke8fCPQGlYfhQTa30ZTlhTAJH78vvAbnmS7jh5WuREK5q1gx1wBxu kq+W+x6BcdCg54Bqxs2bs5S92HD2vd/47nR1aO38OL7ztBN1QUU5QNovguqAi4qRUAFg NUWA== X-Gm-Message-State: AOAM532ufR8pRlaRUiTd+o7HtFjerdVfllrs446ggU4rP8zrtiwGZCyz vAKI3jQ3q6+wtlzZQWSG0edhMo+Nov0Bwv9I55s= X-Google-Smtp-Source: ABdhPJyIiqsxI2kco5UpkYh74gLUISUisjH3r7XcmxZjCDrMtkqppRjWsNgJquYxKV70LjedHDUf1XTvq8yYvwtYNM0= X-Received: by 2002:a17:907:6e17:b0:6da:83a3:c27a with SMTP id sd23-20020a1709076e1700b006da83a3c27amr37574246ejc.415.1648614915413; Tue, 29 Mar 2022 21:35:15 -0700 (PDT) MIME-Version: 1.0 References: <76c399cb-fb29-4583-a212-8eb69740c96b@www.fastmail.com> In-Reply-To: Date: Wed, 30 Mar 2022 07:34:58 +0300 Message-ID: To: Mark Niebergall Cc: Guilliam Xavier , php internals Content-Type: multipart/alternative; boundary="000000000000679a1c05db6812ad" Subject: Re: [PHP-DEV] Typed constants revisited From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --000000000000679a1c05db6812ad Content-Type: text/plain; charset="UTF-8" Hey Mark, On Wed, Mar 30, 2022 at 6:03 AM Mark Niebergall wrote: > > I have updated the RFC https://wiki.php.net/rfc/typed_class_constants with > more details and examples from this thread, and updated the RFC status to > Under Discussion. Hopefully the updated RFC helps answer questions and > clarifies what the proposal includes. > Thanks for the RFC and the drive here. I personally see the benefit and I think it would be a nice addition. I think you should also update the "Supported types" section. Starting with enums, constants can also be objects. Once a good technical solution is found, any object would be supported probably https://wiki.php.net/rfc/new_in_initializers#future_scope I think that only void, never and callable types should not be supported, just like on properties. > Of note is the "Inheritance and variance" section, which details uses with > abstracts and interfaces, plus the "Constant values" section which includes > details about errors. > > > > > > -- > > Guilliam Xavier > > > Thanks, Alex --000000000000679a1c05db6812ad--