Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123463 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 62D671A009C for ; Wed, 29 May 2024 21:12:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1717017238; bh=INErNGdCzLCwRgmhXN/Luw+99HVY/VAuyUsk6JwjQCI=; h=In-Reply-To:References:Date:From:To:Subject:From; b=lscJDW7rXE5rRADek28kygdVcNGC6B/k9WHODBG/iWuicGKObBzsNW260Sohk946B rJbte2L9Ja5OCfYV2CCVBn8taDJ4ZW7fbQ9XMLwNbWIeFhYYTtZUWOsHPP8Dap7YtY Bl6ArLVzjBEDdqcWc5/tX0T5tNPr9hD7ai+gQV3td+tgY11uQ2+oiWOnaUlAu74DlB cZYJ+4gG9FOCZCOai9W9vR5q82Jb1qX657KHgukTNha6KZoBAhyzBoSobEOnYIPFei iOjlnR1FtwS5yUmrQJ1Ft4tjj1vX78yu7NJvCfm/xl02Scq7qfTK0wUF+foaXXpKwJ +sVfKeJkjf6QQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 83DDC1807ED for ; Wed, 29 May 2024 21:13:57 +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 wfout1-smtp.messagingengine.com (wfout1-smtp.messagingengine.com [64.147.123.144]) (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 ; Wed, 29 May 2024 21:13:56 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.west.internal (Postfix) with ESMTP id 11C791C00124 for ; Wed, 29 May 2024 17:12:55 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Wed, 29 May 2024 17:12:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding: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=1717017174; x=1717103574; bh=J4TQPhdSPY51cFS23n4Ph MSiLy6Yg5HnvvU1aDzN9Qk=; b=uETy1TqavIiK3ig4Q6B6GDqf5Wq5pQLGJdZMy jX9uzb1YWHFBVVZYNPAUvnBqgigInZY8xsrXt6KDw+wosusj5FmDY6OMOj2EPCLi hFTd7r0MGJEqkxV678HkzGx9zKaP8ZD5/8KgH4D+vA1EyntDBg4Zk2/P4t1gRBu1 U8KbiRTrk9yZ8satKdoGgADbxrkgcJtuI2dzoqNlDD958PSpax0Qs/r9wWMHSb2Y PbBJW4S21lQw7vCF7Gi/Lqc5ov5BbF/gqUCNdmDBRfBRza5gfGX/fruwaRAOrYUL SZkNTDcaw7qylkszFgLZuEExA1PhG+WHtb5mlcqQCATjDdyjg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=1717017174; x= 1717103574; bh=J4TQPhdSPY51cFS23n4PhMSiLy6Yg5HnvvU1aDzN9Qk=; b=R mJn1cU7bQPjR/u5woyf2ZcPW12hKmrn0J8fdQuXAhJKUQDdFoCEc3x0yjmQYwT1w jVlqs/mRbMDMH/nZjzvmEXhVctZJupZ+uEHjdeLTyEXhBPUQrN2ix4zxC9RlmnnV 4S6HPwThjexDMuVKkoJWBlwuHiBvdERkCow7gWNZSJdX3JAxUe51gdDuekzhE4U1 NSjIyMoXfqTJ0NnTw9czopw6Rbw+/alnbgvaaylj4kG8vaaIjLuqC8Tb6/ftwqlx guZL8/zv1D660pXnA0P8rC1kyGMfP0iOFa8m0n5KlM0r3jUrb5M8fWURj9CKOx5u 1k0GHNAEkImt2TA1L8FJA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdekuddgudehiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepfdfn rghrrhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrd gtohhmqeenucggtffrrghtthgvrhhnpeffffffjeffudfggeevvdeitdetvdfgjefffeff jeelfeejteevheeghffhvdfgleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 2D0481700093; Wed, 29 May 2024 17:12:54 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-491-g033e30d24-fm-20240520.001-g033e30d2 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: <1b0e9a5d-14f9-4df4-8a75-286bfb70ee3e@app.fastmail.com> In-Reply-To: References: <0a6a61cd-f203-4dea-a7f8-97e6b885c52d@app.fastmail.com> Date: Wed, 29 May 2024 21:12:25 +0000 To: "php internals" Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Wed, May 29, 2024, at 7:51 PM, Tim D=C3=BCsterhus wrote: > Hi > > On 5/29/24 21:15, Larry Garfield wrote: >> * We've brought back the abbreviated form, as public-read, something = else set is the most common use case. > > The most common use case is that 'get' and 'set' are symmetric.=20 OK, fair, I meant in the most common case where you're using aviz at all= , get is probably public. That said, with both hooks and aviz, I can see data objects, for instanc= e, becoming commonly public-get, private-set. It's already common to ha= ve them be public readonly, so this is just an extension of that. > Any=20 > divergence from that should stand out and I think that the hamming=20 > distance between > > protected string $foo; > > and > > protected(set) string $foo; > > is too small. I can only respectfully disagree here. I think it's reasonably self-evi= dent, made moreso by the (), which as Andreas noted looks weird when you= 're not used to it (but we should get used to fairly quickly). And the = benefit of not having to type "public" on every property outweighs any i= nitial confusion, much the same as readonly classes just reduces boilerp= late. > One note regarding the text. You already confirmed to me in private th= at: > > class Foo { > private $dontTouchMe; > } > > $backdoor =3D function ($key, $value) { $this->{$key} =3D $value;= }; > > $f =3D new Foo(); > $backdoor->call($f, 'dontTouchMe', 'butIDid'); > var_dump($f); > > would work as expected with aviz. It would make sense to explicitly=20 > spell that out, just like it's explicitly spelled out that=20 > `ReflectionProperty::setValue()` works. Added a note to that effect in the Reflection section as well. Thanks. --Larry Garfield