Hey list. On 16.11.21 16:26, Deleu wrote:
On Tue, Nov 16, 2021 at 3:59 PM James Gilliland <neclim...@gmail.com> wrote:On Tue, Nov 16, 2021 at 4:23 AM Rowan Tommins <rowan.coll...@gmail.com> wrote: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.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.What you described there sounds like a warning and not a fatal error. Maybe that's where some of the trepidation is coming from. I know I'm less worried about the deprecation notice and more worried about what happens in PHP 9 when it's a fatal error.I can't say that this line of reasoning has its merits, but then there's no benefit to the engine itself. Issuing a warning and carry on materializing dynamic properties will never bring the original performance improvement that was part of the original state of the RFC.
Which performance improvement of the "original state" of the RFC? As that was one of the questions that were not 100% answered: What are the benefits for the language. And while those 8 bit that Nikita mentioned in the "Motivation" part of the RFC look nice, he also stated that "this is a fairly long-term benefit that will require additional technical work to realize".
Or did I miss something? Cheers Andreas -- ,,, (o o) +---------------------------------------------------------ooO-(_)-Ooo-+ | Andreas Heigl | | mailto:andr...@heigl.org N 50°22'59.5" E 08°23'58" | | https://andreas.heigl.org | +---------------------------------------------------------------------+ | https://hei.gl/appointmentwithandreas | +---------------------------------------------------------------------+
OpenPGP_0xA8D5437ECE724FE5.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature