DEV Community

Discussion on: Do Developers Still Use PHP (and why that’s the wrong question to ask)

Collapse
 
pinotattari profile image
Riccardo Bernardini

I’ll wrap this up by asking a simple question: if Boeing or Airbus started coding their
planes firmware with JavaScript today, would you board it? 🤔

Because with PHP, sure, I would.

No, neither with JS, nor with PHP.

They can be popular, but they have several design flaws that make them "culture broths for bugs."

Seriously, would you board a plane whose software is written in a language that computes "0.15" == "15e-2" by first converting everything to float and then doing the comparison? Sure, operator === exists and a good programmer would use that; but I prefer a language that is able to defend itself from bad programmers and one way to do that is avoiding to be "smart" by converting everything.

Because of this "smart conversion" == (in both JS and PHP) is not even transitive...

Collapse
 
bdelespierre profile image
Benjamin Delespierre • Edited

You got a point. But I don’t believe any language or platform is more fitted for bug making than any other. I’ve seen my share of bad code in C++ and Java, things you wouldn’t believe, to get rid of the types strictness. Ending up in null pointers everywhere and some guy allocating a 1kb array before the pointer to prevent a core dump, you know… routine stuff in enterprise software 🙄

So I believe software is as bad as the dude (or gal) writing it and every problem resides in the space between the chair and the screen 😂

Some comments have been hidden by the post's author - find out more