Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110432 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 99743 invoked from network); 8 Jun 2020 19:25:40 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 Jun 2020 19:25:40 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 98528180544 for ; Mon, 8 Jun 2020 11:09:10 -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=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS6830 84.116.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from vie01a-dmta-pe06-3.mx.upcmail.net (vie01a-dmta-pe06-3.mx.upcmail.net [84.116.36.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 8 Jun 2020 11:09:09 -0700 (PDT) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe06.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1jiMCq-0008IX-0B for internals@lists.php.net; Mon, 08 Jun 2020 20:09:08 +0200 Received: from mail02.home ([213.47.8.56]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id iMBrj5QlK6Jy6iMBsjwgPZ; Mon, 08 Jun 2020 20:08:08 +0200 X-Env-Mailfrom: markus@fischer.name X-Env-Rcptto: internals@lists.php.net X-SourceIP: 213.47.8.56 X-CNFS-Analysis: v=2.3 cv=GKl27dFK c=1 sm=1 tr=0 a=UsP8JIz990cEySE/ILGzbQ==:117 a=UsP8JIz990cEySE/ILGzbQ==:17 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=nTHF0DUjJn0A:10 a=2EALvoLjsrEA:10 a=ZZnuYtJkoWoA:10 a=f8uK-49vAAAA:20 a=R9SNkdhXAAAA:20 a=f5H-Ywf6AAAA:20 a=svjjHHEhYIB1t8KU-AgA:9 a=QEXdDO2ut3YA:10 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 Received: from mail02.home ([192.168.1.14] helo=[IPv6:::1]) by mail02.home with esmtp (Exim 4.72) (envelope-from ) id 1jiMBq-0000lE-HT for internals@lists.php.net; Mon, 08 Jun 2020 20:08:07 +0200 To: internals@lists.php.net References: <5ebecd58-9f39-72b9-369d-dbb60b80af36@gmail.com> Message-ID: <17c4780c-b4c5-d726-3ee7-915b7762bb57@fischer.name> Date: Mon, 8 Jun 2020 20:08:06 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam_report: Spam detection software, running on the system "scanner01.home", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Theodore, On 08.06.20 06:36, Theodore Brown wrote: > ```php > // 170 characters for attributes (162 not counting leading whitespace) > << > ManyToMany(Phonenumber::class), > JoinTable("users_phonenumbers"), > JoinColumn("user_id", "id"), > InverseJoinColumn("phonenumber_id", "id", JoinColumn::UNIQUE), >>> > private $phonenumbers; > > // 160 characters for attributes > @@ManyToMany(Phonenumber::class) > @@JoinTable("users_phonenumbers") > @@JoinColumn("user_id", "id") > @@InverseJoinColumn("phonenumber_id", "id", JoinColumn::UNIQUE) > private $phonenumbers; > ``` [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: imgur.com] X-CMAE-Envelope: MS4wfCOmDL9D6FZLqUfW8weueedleYepssiKSb6IyZrdfeMXNsbGwSBAuPEt12d5uQyNoEL8W6l9E8E2Bs5HaPa7sNy+wLl362ROCJWrICBrFG62UQJv+i1r BMYiV6tinIyoNxTUqz7beeZMCnKWDdMpzUBSK5pvEkUpk0pBD6HIK7AP Subject: Re: [PHP-DEV] [RFC] Shorter attribute syntax From: markus@fischer.name (Markus Fischer) Hi Theodore, On 08.06.20 06:36, Theodore Brown wrote: > ```php > // 170 characters for attributes (162 not counting leading whitespace) > << > ManyToMany(Phonenumber::class), > JoinTable("users_phonenumbers"), > JoinColumn("user_id", "id"), > InverseJoinColumn("phonenumber_id", "id", JoinColumn::UNIQUE), >>> > private $phonenumbers; > > // 160 characters for attributes > @@ManyToMany(Phonenumber::class) > @@JoinTable("users_phonenumbers") > @@JoinColumn("user_id", "id") > @@InverseJoinColumn("phonenumber_id", "id", JoinColumn::UNIQUE) > private $phonenumbers; > ``` When your proposal came up, my first thought was this is great and should be supported; I simply had a liking for this terse syntax over the older. Until I read your email last night and saw some direct text comparison. I noticed that my `@` character did bleed/meld almost with the first character of the attribute name. I noticed this in my MUA so I figured a proper test in the IDE with my font of choice is more realistic; here's a plainly colored version first: https://i.imgur.com/tq7FzQz.png Notice how wide characters like the `M` almost touch the `@`. Same now in a best attempt PHP syntax highlighted source file (courtesy of PhpStorm, obviously not supporting this ATM): https://i.imgur.com/WVXL8S7.png But even a clearly distinct colored `@@` token did, for me personally, not increase the readability by much ("to me"). At this point I forgot if the following is a valid combination, but it wouldn't matter as I want to make comparison data point for my personally and even this version is by far more readable, to me at least: https://i.imgur.com/GI3HlsM.png Until I had this realization, I was absolutely in favour of `@@`. I'm not so much anymore. Since we humans read source more often then we write, I can only suggest to everyone to conduct their own "visual" testing first and not just judge on technical merits => I think it makes sense to consider both here, since we're already discussing a change here. (note: I'm not a voter here) I wonder what others think about this. thanks, - Markus