News for hackers. Stuff that matters.
Re:PHP 7.4 by Freegile on Thursday November 28, 2019 @10:30AM (#21657955)
But does it have to be =>? How about ~>?

    $a=[$x ~> $x*2, $x ~> $x*$x];
    $a[1](5); // 25
Looks cool to me.
Re:PHP 7.4 by johannes1234321 on Thursday November 28, 2019 @11:06AM (#21658258)
~ is annoying to type on some keyboard layouts (Alt Gr and + onna German keyboard)

Also PHP tries to be "googlable". Typing "fn PHP" into Google should bring relevant hits, for people never seen such a construct.

Re:PHP 7.4 by _wolfie_ on Thursday November 28, 2019 @12:25PM (#21658886)
> Also PHP tries to be "googlable".

If not insisting on the "google" part, there always is http://symbolhound.com/?q=php+%7E%3E

Re:PHP 7.4 by mcovey on Friday November 29, 2019 @11:44AM (#21665324)
I noticed lately google is starting to understand symbols in certain contexts. Searching "php =>" actually does provide relevant results.
Re:PHP 7.4 by asdasdasdasdwd on Thursday November 28, 2019 @11:37AM (#21658547)
There's some rationale here[0]. Basically they'd need to use a parser that on ambiguities would have to go down all possible routes concurrently until all but one fail, which can lead to performance costs. Using a prefix keeps things simple.

[0] https://wiki.php.net/rfc/arrow_functions_v2#x_x_y1