DEV Community

loading...

Discussion on: PHP 8 features I wish also existed in JavaScript

Collapse
tomaszs2 profile image
Tomasz Smykowski

Great post. But actually I am disappointed that people try to defend js by writing false info about availability of these features. PHP is a leading language. It is normal it has things earlier

Collapse
ogrotten profile image
ogrotten

The reason js doesn't have a couple of these is that the same thing can be accomplished in a similar amount of code with already existing features. Therefore, adding them doesn't truly make things better. Why add a named parameter feature if it's already doable with an object?

Collapse
tomaszs2 profile image
Tomasz Smykowski

It is not the same. Named parameters are enforced. Object params are not