On Mon, 15 Feb 2021 at 11:05, Sara Golemon <poll...@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.

Reply via email to