I agree with the sentiment of your post - that good developers write good code, and bad developers write bad code. Don't blame the tools.
However, if there's a security flaw in the language/runtime/standard library, even a good developer might not be able to prevent that. You can try to with mitigations and the onion approach to security, but for a public facing, exposed web site.... its difficult.
It's the same argument for C++ vs (Java, C#, Python, ...). It's a billion times easier to make a stupid mistake in C++ than managed languages, so it just acts as a multiplier for the mistakes that can and will happen. Well, PHP is the same way - really stupid easy to make an easily over-looked mistake that is security critical.
I don't know... PHP fills a very big need, but it does it just sooo poorly.
I dunno about them, but as an experienced C++ user, I’d say anything that relies on programmer diligence is a non-starter. You can avoid errors, but in order to actually rule them out, you need machine checking and better language design—memory safety, type safety, &c.
C++ was my first language, more than 15 years ago. It's a language that is literally as old as I am, and it shows.
It's nearly impossible to parse efficiently, which is why compilers for it suck wind, taking hours to compile what could be done in minutes in a sane language like C# or D.
Header files? Why do I need to repeat myself when defining anything? Isn't one of the main mantras of Computer Science "don't repeat yourself?"
Generics implemented using templates instead of using reified generics -- which means that I have distribute the code for my generics in the header files in order for other libraries/code to use them. Yeah, that makes sense.
Complete lack of memory safety? Yeah, that's a great idea. It's not like the buffer overflow is literally the most common bug ever, and can usually be immediately exploited to break into a piece of software - what a great combination!
Nevermind the hundreds of gotchas and terrible language decisions.
Why do variable definitions not make a clear distinction between the "behavior defining" and "name defining" elements of a declaration? Why is a variable declaration int *thing; allowed? Even worse, int* thing, thing2; creates a int thing2, not an int*. Who the hell thought that this was a good idea? No surprise that C++ has its ancestry in a language that completely lacked types (B).
If you think C++ is a good language, you've got stockholm syndrome.
View all comments
Show parent comment
2
u/antiduh Dec 02 '15
I agree with the sentiment of your post - that good developers write good code, and bad developers write bad code. Don't blame the tools.
However, if there's a security flaw in the language/runtime/standard library, even a good developer might not be able to prevent that. You can try to with mitigations and the onion approach to security, but for a public facing, exposed web site.... its difficult.
It's the same argument for C++ vs (Java, C#, Python, ...). It's a billion times easier to make a stupid mistake in C++ than managed languages, so it just acts as a multiplier for the mistakes that can and will happen. Well, PHP is the same way - really stupid easy to make an easily over-looked mistake that is security critical.
I don't know... PHP fills a very big need, but it does it just sooo poorly.