Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104633 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 91449 invoked from network); 10 Mar 2019 23:30:19 -0000 Received: from unknown (HELO mail-wr1-f50.google.com) (209.85.221.50) by pb1.pair.com with SMTP; 10 Mar 2019 23:30:19 -0000 Received: by mail-wr1-f50.google.com with SMTP id p8so1235418wrq.6 for ; Sun, 10 Mar 2019 13:19:46 -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=lfZ5GUt+pvO5udO0tYIx4m6p5H7mF/uEaLLaXPjXHlY=; b=PWrAuLeZGrKiCf4k3RpAUrohmMO+k/3d7IRv01sASOmTyYPxYKnP2olNpzdweL28uE uLBrZkicanvxDIGt7PGzIlcTXbrS60jUOV2huFD/+xHrEDR9ZzA6LxUMvncWjCQd22Xg EOiC0cxLHjXHFd+1vlsjYOf9nRULt70iLS1wDvMVMt12Fp6hysexHGtsQjuZujUju+Km V5R1uUlTwzwy2NtqapNyTfxd/Q/ji6TrruWqLSCFJ2EvswRvrx+RwjusrmPvcyf/lV8q VMtR78aFq9ekW3uFUu3dOaTwxGs4pY0VDCBUTGVgOgp1DVQbGwnQt2QHqNtlDv4nf5P0 gJAg== 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=lfZ5GUt+pvO5udO0tYIx4m6p5H7mF/uEaLLaXPjXHlY=; b=bYyxJzwP+z9BmkHFZK5SkC+hZ2+wjQAICTjNRFAQi8lwe9pyROVdg/22c0V4pw4XbS UcBQMaicL35nwuw0xqqnMpOSrZqCAY9A0Cu3OS0RIW65HTaV1l7dbQvlbRWIrINfpyWp mv5bPk4dDcs8Z7Ei1jZw5n1RkHeOrQUdSTap2rwCFpH2Ol4yGgT7ovEbgU70sAiXGHVl Nk2ElKbzumQLPEouOrDq1S0cbK7gqHJb5eJrnuKX8pQCK7X1shgnRjVZSHS7BtuRWaO/ ap2kAbDvWAP5xEbfyv7T0zJk1rXEyP5SbkBbqndlQS5hWmQ2kmvL602T1v4LJtQEOIV7 9KpA== X-Gm-Message-State: APjAAAXXMim4sNbs/rOfIONpFaQ05H/QYqAOfPnP+99YABsGsEDPxg98 2hrxT6qcMg3f4KnTQuMZPmyKO+Rk X-Google-Smtp-Source: APXvYqy1wnkPNURH3gzIia24Vid6g98+JOhUpBjjklg6iEskPnpSwZGViolRK2+UKvgkjttMagNvrg== X-Received: by 2002:a5d:6b07:: with SMTP id v7mr17464952wrw.314.1552249186040; Sun, 10 Mar 2019 13:19:46 -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 v196sm16728646wmf.15.2019.03.10.13.19.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Mar 2019 13:19:45 -0700 (PDT) To: internals@lists.php.net References: <2c497732-96f8-3ef0-bc18-912220fbff4d@gmail.com> Message-ID: <4b9e7784-d0c8-2c0b-f349-0d28bd6deb2f@gmail.com> Date: Sun, 10 Mar 2019 20:19:45 +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) On 10/03/2019 19:46, Marco Pivetta wrote: > @rowan: I've stated it multiple times in the past, but if the mechanism is > to be removed, then it should be replaced with a language-level concept of > laziness then. 1) I'm all for adding a language-level concept of laziness. It feels like it could fit with a syntax for getters and setters, which has been discussed a few times, but never quite made it. 2) I'm not saying that the current behaviour should be removed, I'm saying that dynamically unsetting properties is inherently incompatible with declaring a class "locked". I've actually had more than one suggestion that __get(), __set(), and __unset() should not be allowed at all on locked classes; in which case, it wouldn't matter how unset() behaved, because the lazy-loading trick relies on __get() as well. Regards, -- Rowan Collins [IMSoP]