Re: Whitespace around Paamayim Nekudotayim (double colon)

From: Date: Mon, 15 Feb 2021 19:52:42 +0000
Subject: Re: Whitespace around Paamayim Nekudotayim (double colon)
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-113184@lists.php.net to get a copy of this message
On Mon, 15 Feb 2021 at 11:05, Sara Golemon <pollita@php.net> wrote: > That change was made very recently (8.0) and was done for technical > reasons (attributes) not aesthetic ones. > > Personally, I agree that adding whitespace around double colon is a > suspect move, but breaking valid code for the sake of one's own sense of > aesthetic doesn't progress the language, it regresses it. > > -Sara > > TL;DR - I vote No to such a change > OK, I take your point. While I'm at it, I would also be happy for PHP to treat this as a parse error (vs a runtime error, as it does currently): $a-> list($a, $b) = $c; But requiring zero whitespace after -> would invalidate quite a bit of existing code. My reasons aren't _just_ aesthetic, mind – this also leads to ambiguity during autocompletion in IDEs. I realise it's not internals' job to make that easier, though.

« previous php.internals (#113184) next »