Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123504 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 139081A009C for ; Tue, 4 Jun 2024 13:30:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1717507921; bh=JCxq+8eRwxisVmJDqyXOzmbpZ6xRofMoswcX94Xum/0=; h=In-Reply-To:References:Date:From:To:Subject:From; b=H3gHSzVEdUv0CY07c4/TQfjxnhkANaYESkSGR2Tc2BRZUj+ScvFuF7CyIScty+Tqr +x8K+ZBCkM728tuQtOQ4Z/QjLSHo/Yhv5GjRumj6uZv8TWMxYeB1WOklDH445ks6Oo uid4/ADH/YAqjEzxirvZZe+EPIwCa8ofjCpHxi/04+bsmglXcmZgl+arM8DABw6Wyi NiDtcnZrevRrWWNWnqvd/iPUjl2GsOC9FLDHBD1QvmKeFGaB9HRn52JpyKTXpEd/0t ttcd5bVs2AeivpPbMlODz25x3162KbZe9b1vJ1RHZmwrxLssP6LKWw4ZLxC5P5RV8E XG5bdzJY3ijFQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C300318089F for ; Tue, 4 Jun 2024 13:32:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fhigh8-smtp.messagingengine.com (fhigh8-smtp.messagingengine.com [103.168.172.159]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 4 Jun 2024 13:32:00 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id D55E0114012F for ; Tue, 4 Jun 2024 09:30:55 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Tue, 04 Jun 2024 09:30:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1717507855; x= 1717594255; bh=JoDoi1pIVJLNrAuM32zlgyxAiulRd6QVrP666HdzlNY=; b=t Ew6uGT4XitnZKXJtJsyaw7ejPwtdyUtUBiH0YOu71rLK2aQphxf7fVBiqNrQLTpg q9PPki7HOwrNBq05q98NJ4GF/8MJZ3hkFIBYnf+k7IKu+s6nMVXlooLEAXGbCEAP IheEelkrrlu5WJ0FOVXzq0vK+kQiqwriPaq2qsOsqU1+9t7TzVsww9SUIabCBVeE +2hXssAxs+NOQAvQGEn5t7F0N4hiu3AnME4vFBUxztDcck0pihIhhm6fusRlAZW1 RrY4fpsoRh/nyLuz7ou/9EDTIen+ncSkizFD65q/tH10ofufDjrlAMvcWpFPkmjh IW6LE7YEhF8teZ5QHcoTA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1717507855; x=1717594255; bh=JoDoi1pIVJLNrAuM32zlgyxAiulR d6QVrP666HdzlNY=; b=N7hkPoEWgFvjAowrMv72NF/4XvduY5Pkghon5PUnqldD LubWyscsh7mEHPpPE8W2mu8XoUyfCOanCmomsftbyZtAqXCGnNU9o49Y0QHCoHD9 yYMPYJ12FKIqn9YZCR+sCenkCf+qkTTAmOEw4hVj0AV0UbASPyygvlN0u+/QBCHp CqSIXM8CAe24k45XXui7g+Y981AA9MEgUkjyIKK/UM1shJLcO+6qa7LwQe2uJSNl a6pXZr5sEJH30aXgXtf97ujH/79grLJHNsOU+DWaIK+x3tk+ROCV6BKDdsPTSxSC c0RkiUrbRYNFOWZbbFsGHMet0/cQIOMBfIi9UCzHMA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelgedgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeeglefgkeduiedvvdetffeujefftdfhjeeiveehgfff keduveektddvledvvdfffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 5F86E1700093; Tue, 4 Jun 2024 09:30:55 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-497-g97f96844c-fm-20240526.001-g97f96844 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: In-Reply-To: References: <0a6a61cd-f203-4dea-a7f8-97e6b885c52d@app.fastmail.com> Date: Tue, 04 Jun 2024 13:30:35 +0000 To: "php internals" Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2 Content-Type: text/plain From: larry@garfieldtech.com ("Larry Garfield") On Tue, Jun 4, 2024, at 5:01 AM, Andreas Heigl wrote: > There is only one thing that I stumbled upon which struck me as odd: > > > The set visibility, if specified explicitly, MUST be equal to or > > lesser than the main (get) visibility. That is, protected public(set) > > string $foo is not allowed. > > Why? > > Why can we not set a property as publicly writable but unreadable? > > If that is a technical necessity, then so be it. But if that is a > logical limitation, then I'm asking myself: why do we want to explicitly > limit possible usecases? Not that I have one right now in my mind but I > do know that we used similar settings in Filesystems for letterbox > systems where users could copy files into other users letterbox (write > only) without being able to later see the files. > > Similar possibilities are available here here a property could be > publicly writeable but only privately readable as read-access is only > granted via a method. > > I'm not saying it's the usualy use-case, but why explicitly disallowing it? It's not a technical requirement. Mainly, we just cannot think of a reason why you'd ever do that, so making some seemingly nonsensical cases illegal seems like a good guardrail. If enough people felt strongly that it should be allowed, I don't think there's any technical reason it couldn't be allowed, other than it would allow some rather silly combinations. (Ilija can tell me if I'm wrong.) However, also note that it is, of course, much easier to allow more combinations in the future than to remove them, should we find they cause trouble. --Larry Garfield