Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115874 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 76063 invoked from network); 27 Aug 2021 02:28:01 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Aug 2021 02:28:01 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D42591804B3 for ; Thu, 26 Aug 2021 20:02:37 -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, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS 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-oo1-f44.google.com (mail-oo1-f44.google.com [209.85.161.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 ; Thu, 26 Aug 2021 20:02:37 -0700 (PDT) Received: by mail-oo1-f44.google.com with SMTP id n1-20020a4ac7010000b0290262f3c22a63so1587847ooq.9 for ; Thu, 26 Aug 2021 20:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gv4VME4I98mUcJZSRt0RKEPNlCOFlAUpBrGWFqB/cw0=; b=NazuyKyvzySIBaj22e+fRyIWJj6K8fIb0iiif7L1B5VmMSqi3Q6beWYxQ3j5Eo1GxS pyIhyekvL7m+nrzwBEeslAYf6cCCke0mLV8RK3lO9zGnmHbwtWhhKCFHAEzyMmgOTcza 69ervfFB7u3UxMdeyTNhXTLd8P+tPfN67yBrvz/sWd4OWpQQRaI+yZyMRdGNXeh6xkFP Qb92XXCatS3isUzzrm5sAUrBahyFRrrFHRtKaiveMlZeC7QQTi3JU2l8R0gk2RfLR9od j7pbzeq0y0qRrOtt3JFIrCWTrhB8ZUY+Ct7Xcl8fxgYBbaI6p7m9xUh/lmB9Lrsw3+xR AdKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gv4VME4I98mUcJZSRt0RKEPNlCOFlAUpBrGWFqB/cw0=; b=pQ/MvnCnf7f/IiJg7/m6sqmjTPt1zwCAdKU3m5uxAhijxwvOaQtbKFEC8LioraxFWl zgq9TrC9Ww2GUzqu+bsiDJy79pQM9buA1hPJxFULN9HhYEK7CHGI0kjSG8GVLo0f23jM aAIXhELaN120eWYWxKv8hDD9++mgj7eyRlNeA0mtcD0MUg8Ywc6FUDVIGHZP1vfMt93e nXTY1ycUP+M9DCMCcWI7hVrr2jFdA+C5RVmRtWGi6zqmh375izOxZU2v57wQrBd6YFda hugh0S3J7d4kO+w009puQjswl+X7ml+/ymQajvqwZP/0Ot+xsZ18vAZ8+nszk0+r6X2z iWNw== X-Gm-Message-State: AOAM533GF4tpDmxd3MKtQ1gAXM/WptaInb1+4rbQ9D4osVDKm3sSv+AI J07QDE/ssdtu96lf0QZIHz/1EP+ibH2HPTf6HIQ= X-Google-Smtp-Source: ABdhPJzseOhFGTnoHs4nEzJIxFXK2Rv9K1LREvP5JU7sthF7Fkqf0d6M16I8mBJf9LFKHtQmMRnQJ+iTHUccm/P6U58= X-Received: by 2002:a4a:e907:: with SMTP id z7mr5863116ood.20.1630033355737; Thu, 26 Aug 2021 20:02:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 27 Aug 2021 10:02:24 +0700 Message-ID: To: Stanislav Malyshev Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Deprecate dynamic properties From: pierre.php@gmail.com (Pierre Joye) Hi Stan, On Fri, Aug 27, 2021 at 5:10 AM Stanislav Malyshev wrote: > > Hi! > > > The crux of the issue is what our end goal is: > > > > 1. Require users to explicitly annotate classes that use dynamic > > properties, but otherwise keep dynamic properties as a fully supported part > > of the core language. > > 2. Remove support for dynamic properties entirely. The core language only > > has declared properties and __get/__set, and nothing else. stdClass is just > > a very efficient implementation of __get/__set. > > I think goal (1) is reasonable for the long run, and goal (2) is taking > it a bit too far for PHP. I feel the same way. However my gut feeling tells me that we will end up with (2) sooner or later. Having StdClass behaving differently (even if it is technically not, I don't think the "it is a more efficient get/set implementation" will make it through our users base) looks inconsistent. I don't know how others feel about it, I think most want to go the path to (2) and a more strict, if not almost fully strict PHP. Core devs to simplify the engine, users to allow them easier checks and safety in their frameworks or libs. End user don't really bother as far as I can see. We may have to decide once the long term vision for PHP and then do the changes accordingly, and more importantly, with consistency. Best, -- Pierre @pierrejoye | http://www.libgd.org