Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123579 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 296FE1A009C for ; Tue, 11 Jun 2024 13:49:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1718113815; bh=SCSQO3Ilbm3ngAXYjYObs6XRrPM19VQzYgKWo3FvKVk=; h=In-Reply-To:References:Date:From:To:Subject:From; b=VtTgxXk3RgaOSHbHpTXnNE8y+MpBpMR16DLmLuQEXpjoojeBC9n9ggSQeP5mXnQD/ KFYS9J9wNlXDgSTtfTdcZnM6vpDX0CrM2mRLYFyb7sZYhJoqxWAZn120SIpdDZCYgE TYSOuFNLxWrlWwUK4igvBWMnT7jY+gDFi6EN8SDOXRPmpMlnGD6b2lAQNDb7cBCj7x LMAIN8evyfhzhxAASEqTTqW6Hg0FIMx6S/qUeNLtyb1jq+nXmh+CR3VTp9MfPJIAmg mFfd2Tg67yMEkAobej6Gl7vkUUxJ8+2wOiRvOoUGUNjxAIzcDORooC9D2D8anU7OhX LvD893/JFc8+g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 05DC818053D for ; Tue, 11 Jun 2024 13:50:15 +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,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,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 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)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 11 Jun 2024 13:50:14 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 020D71140102 for ; Tue, 11 Jun 2024 09:49:06 -0400 (EDT) Received: from imap49 ([10.202.2.99]) by compute1.internal (MEProxy); Tue, 11 Jun 2024 09:49:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; 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=fm2; t=1718113745; x=1718200145; bh=xW9Mt1n5oL cuu5Mxd5vb3imE3WHQIfPY//mb91vxg4M=; b=QOQ3v0MZ62kQw7/+wddp27pDIt 4oSVLvxgsowN0XWVKlQfFj/ToRkEw9DsIdyBL01hMfc7psUnu6n3MeY0cdG228br piXMP+5tH8ZS1t/ZE+DmMDPzZitVvrbGwhbLLAX23y0B/yV3CyQ8w8YqnPU6N5AO jgBQISv+vgKxuHNXwDMVhCExD/kjARWvy+uu2OLzlFNYB+9liAk4/beBYCYBYZ1H Waqw7nB7eJ7c3QI8PFl+BAcSd8bS+4BuBIC/SvkzCZYAsc1Wce5b2Kfzk2Gu0axW 1Z3SwdDPm7hOGd2iwl+wpaAY/tH5wMlOzGbjOMmVYq0ddixc3CMTTe9jjhmg== 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=1718113745; x=1718200145; bh=xW9Mt1n5oLcuu5Mxd5vb3imE3WHQ IfPY//mb91vxg4M=; b=YGwROOporU5bdKt8hVS78mTPisO1lenKi3dl/yh5z6SV 8HMBaulYJ4seS03SsWbnzUovV6Hyn6iK9CzqmqFCi70DirTUCFuiCQ9y1kyfj2ns Cs5lRCxrJW0t/K6jeo25vDQBlY5rGmS6Ps1SIGrsvvhKSrlQMmMr2b/SPAG5QhOM 5EWlEClFo4bb6vcMnlRH0MVfJX8Po/nmoau1CxiWvWyzACduuFyXAZDzdOLn9+tr d6R4a0gdKhh64x/8T7IKoBVU3ZRNN4C+KomNdpGReWXx32mwcOabZV8UAQG0TZSw dV0MAzxGVcJWLWueeRgsjJqmx/i/lr7xVBWbwhe7Pw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeduvddgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsegrtd erreerreejnecuhfhrohhmpedftfhosgcunfgrnhguvghrshdfuceorhhosgessghothht lhgvugdrtghouggvsheqnecuggftrfgrthhtvghrnhepfeefudfhudduieekkedugffhud fgleejgfekgefhvdeikeelvddvjeehteegteegnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomheprhhosgessghothhtlhgvugdrtghouggvsh X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 8E0A615A0092; Tue, 11 Jun 2024 09:49:05 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-515-g87b2bad5a-fm-20240604.001-g87b2bad5 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: <14f6e0a1-d01b-4dcd-a7d4-f8806ee1db19@app.fastmail.com> In-Reply-To: <4d4df16b-af35-4245-85f4-016d66e8a4fa@app.fastmail.com> References: <0a6a61cd-f203-4dea-a7f8-97e6b885c52d@app.fastmail.com> <43606ecd-8838-476d-8fdf-acc6dbe26359@app.fastmail.com> <4d4df16b-af35-4245-85f4-016d66e8a4fa@app.fastmail.com> Date: Tue, 11 Jun 2024 15:48:44 +0200 To: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2 Content-Type: multipart/alternative; boundary=dfa5c72b72b7416b8769b8043321398b From: rob@bottled.codes ("Rob Landers") --dfa5c72b72b7416b8769b8043321398b Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Jun 11, 2024, at 15:36, Larry Garfield wrote: > On Tue, Jun 11, 2024, at 6:47 AM, Rob Landers wrote: >=20 > > I=E2=80=99m also not a fan of the prefix style, but for different re= asons. My=20 > > main reason is that it increases the minimum line-length, potentiall= y=20 > > forcing you to chop things down into awkward looking lines: > > > > public > > private(set) > > string $longvarname { > > get; > > set; > > } > > > > I find that extremely hard to scan, but maybe others do not. The mor= e=20 > > natural looking syntax is easier to scan and reason about (IMHO): > > > > public > > string $longvarname { > > get; > > private set; > > } > > > > If I=E2=80=99m having to read the code, I prefer to have everything = near where=20 > > it is used so I don=E2=80=99t have to scroll up to the top and see i= ts=20 > > visibility. Granted, I haven=E2=80=99t used property hooks and I hav= e no idea=20 > > how IDEs will help here; maybe it is a non-issue =E2=80=94 but I gue= ss people=20 > > still have to do code reviews which very rarely comes with IDE power= s. > > > > =E2=80=94 Rob >=20 > I have never in my life seen someone split the visibility to a separat= e line from the type and variable name in PHP. I don't know why anyone = would start now, especially not because of hooks or aviz. I just checke= d and PER-CS very directly states "All keywords MUST be on a single line= , and MUST be separated by a single space." So splitting it like shown = above would be against standard coding conventions anyway. >=20 > This is really a strawman argument. >=20 > --Larry Garfield >=20 I=E2=80=99m willing to concede that it might be a straw man, though I di= d not intend it as such. I was being serious in my pointing out of it in= creasing the minimum line length and PER isn=E2=80=99t the only coding s= tandard. It may result in some ugly code, as in my example. =E2=80=94 Rob --dfa5c72b72b7416b8769b8043321398b Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Tue, Jun 11,= 2024, at 15:36, Larry Garfield wrote:
On Tue, Jun 11, 2024, at 6:47 AM, Rob Lander= s wrote:

> I=E2=80=99m also not a fan of= the prefix style, but for different reasons. My 
>= ; main reason is that it increases the minimum line-length, potentially&= nbsp;
> forcing you to chop things down into awkward lo= oking lines:
>
> public
= > private(set)
> string $longvarname {
>  get;
>  set;
> }
<= /div>
>
> I find that extremely hard to scan, bu= t maybe others do not. The more 
> natural looking= syntax is easier to scan and reason about (IMHO):
>
> public
> string $longvarname {
>  get;
>  private set;
> }
>
> If I=E2=80=99m having to= read the code, I prefer to have everything near where 
> it is used so I don=E2=80=99t have to scroll up to the top and s= ee its 
> visibility. Granted, I haven=E2=80=99t u= sed property hooks and I have no idea 
> how IDEs = will help here; maybe it is a non-issue =E2=80=94 but I guess people&nbs= p;
> still have to do code reviews which very rarely co= mes with IDE powers.
>
> =E2=80=94 Rob=

I have never in my life seen someone split= the visibility to a separate line from the type and variable name in PH= P.  I don't know why anyone would start now, especially not because= of hooks or aviz.  I just checked and PER-CS very directly states = "All keywords MUST be on a single line, and MUST be separated by a singl= e space."  So splitting it like shown above would be against standa= rd coding conventions anyway.

This is reall= y a strawman argument.

--Larry Garfield
=


I=E2=80=99m willin= g to concede that it might be a straw man, though I did not intend it as= such. I was being serious in my pointing out of it increasing the minim= um line length and PER isn=E2=80=99t the only coding standard. It may re= sult in some ugly code, as in my example.

=E2=80=94 Rob
--dfa5c72b72b7416b8769b8043321398b--