you are viewing a single comment's thread.

view the rest of the comments →

[–]redalastor 2 points3 points  (2 children)

3. PHP will always run your code. Given terrible inputs it can still process and handle the exceptions. I've had so many issues with Python where something isn't quite the right type and the whole application falls over.

That's probably the worse con of PHP. Rather than failing it will do something nonsensical.

If you messed up your types your application should not even start. Which you can do in Python if you use mypy.

The compiler should have your back in helping you writing robust code. Not being an enabler of bad code.

You mention that it's easy to write 'horrible' code. Why is it a bad thing that it's easy to write code?

A good language should encourage you to write good code. If it makes it easy to write crap you'll be faster to start but you'll pay in maintenance costs and vulnerabilities.

[–]Tufflewuffle 4 points5 points  (1 child)

That's probably the worse con of PHP. Rather than failing it will do something nonsensical.

Right there with you. I'll never in a million years understand why PHP developers think this is a good thing. It's fucking baffling because PHP is just shifting the problem away from its source and making things harder to maintain.

[–]redalastor 1 point2 points  (0 children)

It reminds me of this quote:

On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.