Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123509 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 259A31A009C for ; Tue, 4 Jun 2024 17:54:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1717523723; bh=t41O5sSjfzz7rCXNZywxRrzL74TvYMDuFHbUrFS+ZOc=; h=Date:Subject:To:References:From:In-Reply-To:From; b=i+trCUE67WzsdSdwQetovTaS+d+BO16QD9CZ0NN9aItAlR5gQFWrTYoW8ftes/p7j TL1NSCixex5m0cQhV221oUffrUd1o5iBne9ymheefHpGmjwS7fKDSPTbd6w+HVxyu6 +OGZts06pqF4u6qDGo5ZHc65FRtSWbkurZirdh6pk+e/1s35zUkuo+YUfo3GZJOGyN YjpnfuDNzTSb5V5op13BkhSQWQ4TaArZI0WB5jboKJz3q7wpMJMyVUwEHUD20/zsuO AHbc0++n/2yyI06tIgOaihxSSLlMtmx0JSnrVjw+G0/UDMa+Kccst34JKuuPteWPe3 efzvTpWTorwwg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 640A2180539 for ; Tue, 4 Jun 2024 17:55:23 +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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS,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 chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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 17:55:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1717523658; bh=lEyZb8bd7GVdv79kDAWp0/XAw2omsA25/fptu9Jmf/o=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=QSs+l358dTXz35T5UHggoGlncexUUdFL5ZN7VeK/Q6nhBqKNHJats0eMWXWunFnLJ s/TNzMCTP82Xwg6UB/1oauA82+fpJY9mBrXd1KVVEr0okHgq56EG7X4KPVP7U+oCjD mkNDKA1Y2rctqPa7kOplAGjf8O1n4sw3OacpOanh7KKF64eLaNmOoMb5ZpQtwz2JBh wtqbg+Ve2vSsgd8g1K1E21MPbIUw4DTVG7lbEVOQF1FK7j3n0hm72rGCiLP3oNI2bL YlgAoxipXAxHx6PQ7D2SS8T66bsoGY2KVKUqWzeQbNJaK2r9AzKk+eqZJO89MlXRRs k5KHoaNmxf4bA== Message-ID: <6b798516-8854-4479-806f-dc2877c6b0ea@bastelstu.be> Date: Tue, 4 Jun 2024 19:54:16 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2 To: Larry Garfield , php internals References: <0a6a61cd-f203-4dea-a7f8-97e6b885c52d@app.fastmail.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 6/4/24 15:30, Larry Garfield wrote: > 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. One thing that would get pretty wonky would be private-read properties: Private property names are currently internally "mangled" to include the class name. This allows to define the same private property in multiple classes of an inheritance chain, without those classes needing to know about the private properties of each other and making the addition and removal of a private property not a BC break. For all intents and purposes those private properties to not exist, unless you are the class itself. I have no idea what the semantics of a public-write, private-read property should be - and this problem is pretty similar to the sibling-discussion about making private-set properties implicitly final, because otherwise the semantics get wonky. I believe that the case of making a property public-write, private-read is best left to a virtual set-only hook. Best regards Tim Düsterhus