Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116407 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 81408 invoked from network); 16 Nov 2021 09:28:44 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Nov 2021 09:28:44 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A908718054C for ; Tue, 16 Nov 2021 02:23:39 -0800 (PST) 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.8 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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, 16 Nov 2021 02:23:39 -0800 (PST) Received: by mail-wr1-f42.google.com with SMTP id u18so36528297wrg.5 for ; Tue, 16 Nov 2021 02:23:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=gAXq0OstSt7WlcZ3dJ94szSjW7MqI+en6Mty2jVB7/g=; b=BfFCaTKRUb6w1xY9L84QIkKDszeoTK5XaSm9DZgaL6bArAODcFqLI+Bdzp4dszoeZm eCjJYdJWC2n7Xv4gkIN1QU1nzMVQLvUS7XKvs21LHjQwybZDko64snyukqBNaD6W4wWd ZA1Kbae8SmL/x38nBqZ13yPPAKYohA4tk6SIm/qotwu+CH4v/K1oFhZhYekgycj1Rxyc UBfzd0TkjO+I2kYo5EKYXgK2LWHVXi9zzv5I49vdfhtOtmS1SzdcFeLlxNa2hiewkhLH /StYxUagfl1drAaGs4Besx7V9cXcwx3cuib61koAUszjhFtq0FCOVxNBLWR4xPBZh256 aagQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=gAXq0OstSt7WlcZ3dJ94szSjW7MqI+en6Mty2jVB7/g=; b=o7Ik4KMn3jGeD4h2+/Uv1tiup9KON6FfDnfpg/IvLmBDKbJeJD0dOztQ9I7gk4izia 1HxgdxHUbUPyvhwOVKCRMm6XFqjvnArYHwAzAHEc/o6moF1OPvLVdhI0a/ehzPd0uzGX 1yw6II+gHxBXsSxHMS/wM97dDAs2/BHnIVlHKqqjLt7kioy8808U6CiXcFrumMFI2pyB yqJjJhnPhqT9jFm9x477RTgZnbucCcKR3kLNUTSIrs/YO7KaUYNiqRkIAlhzgZoarWbU 3L/QBb3zdk10lVivyNY6GJW0+nqnBm6cG/QXTudTHvvPKMmwjeIsZNXUbuUyKIhwLv4U XNOw== X-Gm-Message-State: AOAM530pAkFl31bwguqlujcEiVo3zRBcTi7wmktB48bkAK/dQl1ayxCT 2D/KyQ93tJiMRsa/p/bQEDsEXzkx4vCu5A== X-Google-Smtp-Source: ABdhPJwXRPuRHaJZvCBuBll6CmR5/lYAS1bqSo6QTId9fCUABgfTQH+j2BIteEs88OTN/Jd8nUO30Q== X-Received: by 2002:a5d:4143:: with SMTP id c3mr8210741wrq.254.1637058217955; Tue, 16 Nov 2021 02:23:37 -0800 (PST) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id h15sm2251331wmq.32.2021.11.16.02.23.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Nov 2021 02:23:37 -0800 (PST) Message-ID: Date: Tue, 16 Nov 2021 10:23:36 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Content-Language: en-GB To: internals@lists.php.net References: <371ca983-2b07-ae39-3629-49cf7ff8ee64@heigl.org> <497ab532-a39d-389c-8bca-86768650c2f4@heigl.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [RFC] Deprecate dynamic properties From: rowan.collins@gmail.com (Rowan Tommins) On 16/11/2021 09:27, Andreas Heigl wrote: > >> I see, yes, code that is 100% perfectly tested can get away without >> the language performing any error checking at all - the behaviour is >> all guaranteed by the tests. I would be very surprised if even 1% of >> PHP applications can claim such comprehensive tests. > > The topic here was that new code can verify the declaration of a > property by using tests. That does not need to happen on the language > level. I was never talking about adding tests for existing code. Whether the code is "new" or "old" is not what matters; what matters is whether the test suite is comprehensive enough that every possible mistake will be caught by a test. If it will, we can remove a whole bunch of language features - why use parameter and property types, for instance, if your tests guarantee that they will always be given correct values? For most code bases, even new ones being written from scratch in PHP 8.0, that level of testing simply doesn't exist, and having the language tell you "hey, you wrote $this->loger instead of $this->logger" is a useful feature. And, in a lot of cases, more useful than having the language say "OK, I've created your dynamic $loger property for you", which is what currently happens. Regards, -- Rowan Tommins [IMSoP]