4 ms·
As a JS dev it’s nice to see php imitate some newer js syntax like nullish coalescing, arrow function, … helps me to switch between the languages. It really ne
by NaN1352 5y ago
As a JS dev it’s nice to see php imitate some newer js syntax like nullish coalescing, arrow function, … helps me to switch between the languages.
It really needs a way to declare type of small data structures though, in a very concise way (no class boilerplate, for performance eg. going through 10000’s of entities).
PS : on the other hand I’m starting to dislike how languages become "designed by committee", and lose the purity of the original design.( thinking of JS mostly here with its gazillion rfcs)
- akie 5y agoAs a very long time PHP developer I say this with love, because for PHP it's actually a blessing to be moving away from the "purity" of the original "design".
- bell-cot 5y agoPerhaps worth noting - nullish coalescing is an old feature of the Unix shell. (From a quick skim through Wikipedia, it seems to have been added to `sh` in System III - released in 1981.)
- charrondev 5y agoPHP received the null coalescing operator in PHP 7 (roughly the end of 2014) after this RFC https://wiki.php.net/rfc/isset_ternary https://wiki.php.net/rfc/isset_ternary JavaScripts nullish coalescing operator landed in chrome 80 (feb 2020) over 5 years later… more like it’s PHP syntax landing in JS land.
- deleted 5y ago[deleted]