Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104624 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 68911 invoked from network); 10 Mar 2019 22:33:35 -0000 Received: from unknown (HELO mail-wm1-f43.google.com) (209.85.128.43) by pb1.pair.com with SMTP; 10 Mar 2019 22:33:35 -0000 Received: by mail-wm1-f43.google.com with SMTP id g20so2254602wmh.5 for ; Sun, 10 Mar 2019 12:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=au03Ud9i1T08Se7IVuzvnmH4qVmWflMmE7rXqjS18CU=; b=AiXw8CRc7YADoYsVc2FgSTJf0FZKc4fif1MTBk4s/opN1HEnX+kGaAa4y9wfD/c23c I/glCwDWMgYMkWufVhVR4Yzfh2CFvDx1OvNcjEdOYwewXloutmI98KiDtkFJZIHZKlbF FPHxOd8qvPiUFCArjlKznuEekuRSRQ+adU6f0DliD3PieKAyMj7Ll/Iv3k4KrthT0Z5/ 7/ho3+mo4ZJ/0DVNadWPeCAeILRYFn4ZA/SZRe36fh1NQKZefBO6Wji1iiVIfDuMFJuX XSywWR8pcsiC7jWfhHrFOlUWocZXVNLjiJxKipTuElML1+0R9uDiQR7vJoF176g20JyY lXXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=au03Ud9i1T08Se7IVuzvnmH4qVmWflMmE7rXqjS18CU=; b=gBngxbV1eXx5+CV+FOi3y62T9lL+4ug+/1x2S8g/zpcwkWC7jBnR6xknfi5Z8uE6Jw MoRBroS98ZqtIMtVauRFOAQU5Ayi5Abyy163/Ivj82lEaQNak8Ts9NWZfpGxvUhU/OVg nhmkIpjWwEBfOVE32FpHKLlcST5W5r7kbtpAHmd+dFEk5fYsuWh2K09S6i5ri4z0NN8n bWd1/W/9O6HDOpBhPxHaqO5Gz+VU2X5WSfcAspWVwGUgCvURmM1K6zd2cdbOR0DJZKeM VtaTJ2iY/S9SqkG6zfRzYsHMLWvkmWBoQhi4xVoyzMl4gLdPQgyaTAOC4Jdbr2tZVec1 1mFw== X-Gm-Message-State: APjAAAXWL6Sqsnc892xpwZHVT8HWursLD1GXeejmqgC3St+PJ5Fh8XTA LMPvxd8SbdwpVDbmciVlgJO5Uhml X-Google-Smtp-Source: APXvYqylPKI2Fy+EP7ADerpE1KrQ/HGp96ERCDvZo/v/Cf/hGV0Knarf5qbiltTRQIu9/uUtZzsyhw== X-Received: by 2002:a1c:6788:: with SMTP id b130mr16026665wmc.102.1552245782079; Sun, 10 Mar 2019 12:23:02 -0700 (PDT) Received: from [192.168.0.16] (cpc84253-brig22-2-0-cust114.3-3.cable.virginm.net. [81.108.141.115]) by smtp.googlemail.com with ESMTPSA id o12sm13086291wre.0.2019.03.10.12.23.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Mar 2019 12:23:01 -0700 (PDT) To: PHP Internals List References: <2c497732-96f8-3ef0-bc18-912220fbff4d@gmail.com> Message-ID: <3b392663-9a71-cb3e-188e-e98044ff9ceb@gmail.com> Date: Sun, 10 Mar 2019 19:23:00 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [PHP-DEV] RFC: Locked Classes From: rowan.collins@gmail.com (Rowan Collins) Hi Marco, On 10/03/2019 18:51, Marco Pivetta wrote: > Overall good idea, except that I disagree with the `unset()` being > disabled: that bit is strictly required for lazy-loading purposes, and > mostly harmless for userland ("normal" people don't do it, libraries > do it). To me, the unset() restriction fits naturally into the definition; I think most people would consider "removing a property" in the same category as "adding a property". Notably, it's included in ECMAScript's definition of sealed objects [1], which is essentially the same feature. I understand that unset() currently enables a neat trick for lazy-loading, but it feels like just that to me: a trick, not a core part of the language. Similarly, there may be tricks that rely on adding dynamic properties to objects, but that's fine, just don't mark those classes as "locked". [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/seal Regards, -- Rowan Collins [IMSoP]