Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118387 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 75381 invoked from network); 8 Aug 2022 08:11:36 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 Aug 2022 08:11:36 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 56B481804F8 for ; Mon, 8 Aug 2022 03:12:51 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS29838 64.147.123.0/24 X-Spam-Virus: No X-Envelope-From: Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 8 Aug 2022 03:12:50 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 0A0B332002F9 for ; Mon, 8 Aug 2022 06:12:46 -0400 (EDT) Received: from imap44 ([10.202.2.94]) by compute2.internal (MEProxy); Mon, 08 Aug 2022 06:12:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ollie.codes; h= cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1659953566; x=1660039966; bh=S8Rb6+F/PK 7lFyLu+Tw0wyqEstDcIhCusKMoHp3Hyjo=; b=rlOEm094msLdIujm/W3qnDMRVD 7Y0jxnGgu6i5eHcYdXi2Vauw2IdBeaTKg88P5qNStSIbuYjTjBOF646UoRTKivOq suZO/BqNuOdZLvL+kmA/Xzd1BSpdj/decjOw7qh5VK+ROmatQ7rrgns0SvglG+dM FPMLTc7V7XaGfAhrM49i3UwrEhGzqi5ghCxAFNmSKf8+aUJMNhyaC8GmrUEy1304 hk0vKixnNry0ROl/H9UOZMaV8zsEfVEapRA/kVfdd0xS+DhkLmc+9EfgJywA1aRX b8LYUzcu/H7bezTeOF2a0SfZAhuuGhJIbgwlcD8gKpbmbKs7eTpiSsNk816g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1659953566; x=1660039966; bh=S8Rb6+F/PK7lFyLu+Tw0wyqEstDc IhCusKMoHp3Hyjo=; b=BKXkgyDRp9QpvQvvHWkqFQ8jJ+gDSFujuyYcDl5RZ68s oYeo6nuza9f3o3k6Vu5FsJBuYwxS5XIwE485861OWRcsOu8TduaJLDjGbAvM7kuc ya3zyQRRcCOIIlH5vuf8B2e8aiBSjZh6d0yR29LqEBjXiBK22onkLazu6nWIFUai M22uMZbFqeVDucBtY65fl92d/dqXodY4I8jk1FR5tayon6xwpefUftIDVtVnadHN tQQ5ry6BJROQliEu7Vfrf9Uioe/7IXp/QRBkl83d4RD72w5lX48vPlak0V5/Cslc Xg9mFLl7Bk9BwSuOqImbXOA/x2lxzNoXWMQvT7L6vQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdefkedgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsegrtd erreerredtnecuhfhrohhmpedfqfhllhhivgcutfgvrggufdcuoehphhhpseholhhlihgv rdgtohguvghsqeenucggtffrrghtthgvrhhnpedvtdejgfetleeuleevkedvveeuudekfe fgheetueejvdduffejffdvuddvgeelueenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehphhhpseholhhlihgvrdgtohguvghs X-ME-Proxy: Feedback-ID: i835c46d5:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 3DCF336A0071; Mon, 8 Aug 2022 06:12:46 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-758-ge0d20a54e1-fm-20220729.001-ge0d20a54 Mime-Version: 1.0 Message-ID: <6a52a2bc-a6ec-4d69-bc77-4c4b48f63a29@www.fastmail.com> In-Reply-To: <6576371A-9C18-4BC4-ADA6-8F364208BF01@newclarity.net> References: <6576371A-9C18-4BC4-ADA6-8F364208BF01@newclarity.net> Date: Mon, 08 Aug 2022 11:12:16 +0100 To: =?UTF-8?Q?Bj=C3=B6rn_Larsson?= Content-Type: multipart/alternative; boundary=dcee18865e2c4702acbad4004a651003 Subject: Re: [PHP-DEV] [RFC] Asymmetric visibility From: php@ollie.codes ("Ollie Read") --dcee18865e2c4702acbad4004a651003 Content-Type: text/plain On Mon, Aug 8, 2022, at 3:54 AM, Mike Schinkel wrote: > 3.) I have concerns about the proposed methods isProtectedSet() and isPrivateSet(). > > These names feels like we are asking if some thing "Set" is "Protected" or "Private" where no such "thing" exists in this context. > > In other words it reads as if you are asking "Is it a *protected* Set?" or "Is it a *private* Set?" Such naming also does not relate to the Property itself which is what the prefix verb "is" is acting on. > > I would propose instead we consider the following are these instead would be asking the *ability* to "Set" the Property is "Protected" or "Private" where The Property is again what the prefix verb "is" is acting on: > > isSetProtected() > isSetPrivate() > isGetProtected(), and > isGetPrivate() I feel almost as if we shouldn't pollute ReflectionProperty with these additional methods but should instead have something like ReflectionAsymmetricProperty, which would in turn extend ReflectionProperty. I guess it depends on how it's handled. If all property handling is updated so that "public int $number" is identical to "public:get public:set int $number", there's no issue, but if we treat those with separate visibilities to be additional, it probably makes sense to be somewhat separate. While isGetProtected() is technically false for "public int $number", if it's not inferred, it's semantically incorrect. A good example of this is ReflectionMethod::getPrototype, which throws an exception if there's no prototype. Although this is somewhat bizarre, it is at least a thing we do. --- Best Regards, *Ollie Read* --dcee18865e2c4702acbad4004a651003--