Re:PHP 7.4
by nolok on Thursday November 28, 2019 @10:32AM
(#21657965)
Because there are several contexts where $x => $x is already valid PHP to mean something entirely different (array, foreach, ...).
[ Parent
| on HN ]
Re:PHP 7.4
by gremlinsinc on Thursday November 28, 2019 @03:02PM
(#21659830)
would like if they'd just change the syntax to foreach(something as k,v) or $arr = ['something':'value']... or then could use => ...or they could just use -> and change -> to . notation.. I use js a lot more lately so having it closer resemble es6 would make jumping back and forth easier.. I often start writing a json object when I want an associative array.
... change three different operators because you can’t handle the syntax of two different languages? Sure why not.
Perhaps php should also drop all type information so it can be more like the cluster fuck that is “modern” JavaScript too? Maybe change “const” so the constants it declares aren’t... constant?