Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123459 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 8AB7B1A009C for ; Wed, 29 May 2024 20:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1717013071; bh=jeAOFxEo3qzA8hqIJf8HIoZNEqmCFm+4e6NoiMFQPmE=; h=In-Reply-To:References:Date:From:To:Subject:From; b=lAx2PqSPwVqlKanC6D71VPhis43nAW4ZgXrrBejCKEzwNPv81gLO/a3T3wny5Gfnr PxlhsUTGMXVw4vUO9Qzj8TWCq9m6XfnBjQO9ndx16M24z0YZ5iiGZTv2y+fZ6V+TAx Ixri8AKQ9RrxWuT4/75QF6Ef+5ZENbIfg9PflYSFgfJ0SgoAtDExC26gYT5Ucb6iEx BTJ5Mfbim4Duvn8fwz/x+e9oOBj8QBC+BwrKR14C4A6kDY+TYswdtMNFDMa8TWu05g tU7UFoqubYh2K6AjqU7gecpoOqOX3qk8/zvKzuLbEPUKCkx+ek5rYz3HRN4IHCng1F GyHSzoWwdTrdA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3BD4F180056 for ; Wed, 29 May 2024 20:04:31 +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 wfout8-smtp.messagingengine.com (wfout8-smtp.messagingengine.com [64.147.123.151]) (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 20:04:30 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.west.internal (Postfix) with ESMTP id 356B51C000E0 for ; Wed, 29 May 2024 16:03:29 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Wed, 29 May 2024 16:03:29 -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=1717013008; x= 1717099408; bh=sFS/nmNebMWq6xLNZCGSgbD4RkadGE98/8uNGgpCmMk=; b=C TNzldBAtNbu8xGwLVGjMa+suitJWyPLjmLLAKYrvGd+DFatEpDosTgd+wC5O4DvK ZNrO/PbuXTpY/ku/rfdo0IecaunOrnDNMMLa7ZLRXLrDxqcpMz40y5pPEWhA9awS 1siNEfipylu5I9tyLNHXbPeao/QwEaQrfkYA2D7yzQYnY0jklpXmseaPLndi6W17 m3er3O/wekf43zlHOGk8B9ngQtOApUPj8j+y85SYlqOjMszjuLK9K2pvDgB3Dohr whyMCgkSGlH0IS5JKW986QWFCfl0UkN7VICgKePxwiCD5MJ64xgn7qAk85FqP/bo DpJ5p4dL726RWdSSkaj2g== 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=1717013008; x=1717099408; bh=sFS/nmNebMWq6xLNZCGSgbD4Rkad GE98/8uNGgpCmMk=; b=gnHhX7vzQmZgei9B15tVO2/8UeaAaM6VmYFF6A6uzL1y x/GOpF+4zgYDJasYodPAksQ5fs58zdQlFkS/Vrk0rD4SJw+znd2ntBr185xYVEmV HEb+OtGIQTcVONsCS+xoy7ExtP2CySRTNLZoFXIA5kyOJ6ApHc/hsTBSuqmiWxeb V4rnWbxnRD+E3jJZt38yro39EtFd8hPHrWMyOizGT4ic5yvLlCK3jP0yg4E4/zEI wR3owLMD7S3wWTa/UIaVBOneIZkKW5ovzNMGuXXdKPIM9VXuSFZy50szR5lrW2O5 8sX9FZ0RX3StQyjz6XXO94DqCRWPJ2wXD+KKgVw8FQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdekuddgudegvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepgeelgfekudeivddvteffueejffdthfejieevhefg ffekudevkedtvdelvddvffefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7054B1700093; Wed, 29 May 2024 16:03:28 -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: In-Reply-To: References: <0a6a61cd-f203-4dea-a7f8-97e6b885c52d@app.fastmail.com> Date: Wed, 29 May 2024 20:02:54 +0000 To: "php internals" Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2 Content-Type: text/plain From: larry@garfieldtech.com ("Larry Garfield") On Wed, May 29, 2024, at 7:53 PM, Andreas Hennings wrote: > Hello Larry, > just a quick thought. > Is there a reason why we cannot just make it "public private string > $x" instead of "public private(set) string $x"? > We would define that the second visibility specifier is for write. > > The current proposal with "public private(set)" is less ambiguous, and > it is immediately obvious that this is something new, and not just > somebody accidentally added two modifiers. > At the same time, it feels a bit alien and cluttered. > > Other options could be something like "public:private" or "public-private". > > A consequence of such options would be that you always need to specify > the read visibility along with the write visibility. > But this seems ok to me. > > This is not a final opinion, just a thought. > > -- Andreas We went through a bunch of syntax variations last year, including "public private", "public:private", and "public private:set", plus a few others. In an RCV poll, public private(set) was the favorite. (See link at the end of the RFC.) It also allows for extension to other operations and scopes, and for the short-hand syntax. Many of the other options did not support those. Thus we stuck with the known syntax that had the most flexibility and most support. By other operations, I mean, suppose we allow varying the visibility for obtaining a reference separate from a set (for some reason). It's obvious how that would look with the current syntax: public protected(ref) private(set). With "public private" or "public:private", it's really not clear how we'd even do that. --Larry Garfield