Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104655 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 50526 invoked from network); 11 Mar 2019 17:29:19 -0000 Received: from unknown (HELO mail-io1-f50.google.com) (209.85.166.50) by pb1.pair.com with SMTP; 11 Mar 2019 17:29:19 -0000 Received: by mail-io1-f50.google.com with SMTP id x4so4152785ion.2 for ; Mon, 11 Mar 2019 07:18:58 -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; bh=Vi9t/ntWSmMU9rpizmAJ+lGjd5TPvpvULXIoQ6Q3ZIw=; b=b0J+VaLIQmk0s6FcVUhpaqvKtyiMLWM4+BMfYDWs+qDkZ5/rl+OM4ZO0vVc8wlVKAJ LnW4GIEPkd2hiokZcZKP5fp3PXXwnQwyz7QlyaTFMHTeA7fgE4E3q7jS/9+KQnMz7NRu gpuhfzHHcw7ITzvA2LwK7MxSB0U6mxA00jJow9VYJHWZ/gW9+lGSbBpbN6Cy1kQgYpqG M90ZM/Il14/toQkhf/h9NqKZXRQpkwQTauFAb1b0OE/HzIW36dYJPLOLfzkvOELPDub0 5ObZFJrdXafziyMgMDN7whK2ZXXPvMD/QpRQ2tguTQf6Mm5KlO0UwQUi4UlBzQY45EIG Cu6w== 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; bh=Vi9t/ntWSmMU9rpizmAJ+lGjd5TPvpvULXIoQ6Q3ZIw=; b=TZx3otCejqXaUy3gGzuk0FKJemTi5UVlqSGFp4KNlEUQB8CE7+YpOv6425bOLYnbnO 3KNlAlL+F2NAU0dJUITwZ6mKajSluUmkVbpr4wjE2rlASQHnqzGVa4XmmDelh6rilvvT ejuoO/Gu6rYd5Sd4BvGoQ1+HQsNJBUIjeMbZuNA7cdzaYjvprJUF96847Am5nCpoYZ1e 7UNQeg84E6e+4uc17IG4s34SufcAPSOGDZI4CDvLsRFS1DQZCSd2XxllXmFclNhyHgwQ DeV+vQDOOOHoj41uIucP4Fyckgq12f8Sn8D0AlNpAca7FHghaDlGUZOOX3uHVoVsuhHg kWrA== X-Gm-Message-State: APjAAAUKFxC48++2w7rTTbyKpWgQG/rJ80oi4PlXR3q6lK9HWB/NBshe 8qLAbkjix5qQzqvF1ARQrBaHqOvdocTiXLp/OL08Dw== X-Google-Smtp-Source: APXvYqxGyVeY7ugkoqt9gai1Dx4WOcmfXuez8Mg43sCp8mazE7Bbsqu4jwmD3nvZbd+oEAS7emDWWiMen1ez/0km+Xc= X-Received: by 2002:a6b:e514:: with SMTP id y20mr15545489ioc.235.1552313937708; Mon, 11 Mar 2019 07:18:57 -0700 (PDT) MIME-Version: 1.0 References: <2c497732-96f8-3ef0-bc18-912220fbff4d@gmail.com> In-Reply-To: Date: Mon, 11 Mar 2019 14:18:46 +0000 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary="000000000000d652fd0583d240ba" Subject: Re: [PHP-DEV] RFC: Locked Classes From: rowan.collins@gmail.com (Rowan Collins) --000000000000d652fd0583d240ba Content-Type: text/plain; charset="UTF-8" On Mon, 11 Mar 2019 at 12:35, Nikita Popov wrote: > > Removing the ability to use dynamic properties (even excluding stdClass) > is probably not feasible on a short timetime. However, I think that having > a directory-scoped declare would also be useful for that, because it allows > a more gradual migration. You can start with having strict_properties > default to false and have interested parties opt-in. Then you can flip the > default to true, while still giving people who rely heavily on it the > ability to opt-out. Removal would be the final stage where the ability to > opt-out goes away. > > I think that's actually the best argument I've seen so far. The current proposal is basically very conservative: a simple, self-contained change, that even a noob like me was able to implement. The downside of that is that it doesn't have a long-term vision: there's no clear path to making all classes "locked" by default. I agree that the combination of package- or directory-scoped declares, and a switch that can be both opt-in and opt-out, gives a better future direction. I just hope we get those things, rather than just having neither - as happened with "static class", which was rejected partly because "we'll have function autoloading real soon". Regards, -- Rowan Collins [IMSoP] --000000000000d652fd0583d240ba--