Comment by tsss
6 years ago
Shout out to all the Python programmers from the other frontpage thread who are responsible for bugs like this with their crappy scripting languages.
6 years ago
Shout out to all the Python programmers from the other frontpage thread who are responsible for bugs like this with their crappy scripting languages.
Crappy code can be written in any language, see all of the CVEs in C code, even when written by experts.
As surprising as it may be, bad code is often written by bad programmers. It doesn't matter what language you use if you write bad code.
But scripting languages make it especially easy to do so. That doesn't mean people who use them are bad programmers. They just chose a bad tool.
And php makes it easier than python, but it isn't a scripting language. Your original point is still invalid.
Alternatively, some amazing tooling has been written in these "terrible" scripting languages. Instagram was sold for a billion dollars and was a glorified Python Django webapp ontop of a Postgres database.
I got in a similar debate with a coworker recently over some go code he wrote. He told me that go code didn't need full unit tests because the compiler checked for bugs. Amusingly, he swapped the order of two int arguments in a pull request literally an hour after our discussion. I pointed out how a unit test would have prevented the production regression he caused, and then he started writing tests for his changes. So yet again, scripting languages have nothing to do with "good" or "bad" code. It is all about good vs bad developers.
I think if you want to blame scripting languages, you need a license plate that says "None" or "undefined".
What happened in this case was that people used the literal value "NULL" to mean "I don't know". They could have used the word "LOLCAT" and the effect would have been the same. Overuse of in-band signalling is a general design flaw not specific to any programming language. (Remember when people would whistle a 2600Hz tone to make free phone calls? Same thing as this.)
If you want to throw darts at someone, I think database systems with three-valued logic would be a better target. This criticism (not for these reasons) has been leveled...
NULL is in much more widespread use then Python. C and C++ have implementations where NULL == NULL. https://www.infoq.com/presentations/Null-References-The-Bill...
It's spelled 'None' in Python.
Ignoring the lack of 'NULL' in Python for a moment, this wasn't even an issue with the code lacking an invalid input. If you read the article, you might have realized that.
Well - Python doesn’t use NULL, to be clear.
In the other notorious scripting language JavaScript it's also spelled
Which makes for a bit of funny because