5 ms·
Your argument is tautologous. Any "clueless programmer" can "screw themselves due to ignorance" in any programming language. The question is how difficult it is
by amptorn 9y ago
Your argument is tautologous. Any "clueless programmer" can "screw themselves due to ignorance" in any programming language. The question is how difficult it is for programmers to avoid mistakes and how aggressive the programming language is in punishing programmers for their mistakes. C is terrible by these measures.
- geezerjay 9y ago> Your argument is tautologous. Any "clueless programmer" can "screw themselves due to ignorance" in any programming language. It appears you're missing the fact that someone needs to be completely oblivious and very foolish to expect anything out of behavior which was intentionally left undefined. I mean "undefined behavior" clearly signals that no particular behavior should be expected. A programmer needs to be particularly clueless and specially incompetent to write code that has unexpected consequences and goes against the warnings specified not only in the international standard which specifies the language in detail but also in long-standing programming references. A programming language is not "aggressive" just because incompetent programmers decide to go against the very specification of the programming language to write broken code. Your argument is like claiming electricity is "aggressive" just because some idiot repeatedly sticks his fingers in an electrical outlets and in the process zaps himself.
- cesarb 9y ago> A programmer needs to be particularly clueless and specially incompetent to write code Or just distracted. Even the best programmers make mistakes. Which is why programming language designers should attempt to make it easy to do the correct thing, and hard to do the wrong thing.
- geezerjay 9y ago> Or just distracted. Could you provide a single example showing how distraction alone can lead a competent programmer to write C code that relies on undefined behavior?
- amptorn 9y ago> A programmer needs to be particularly clueless and specially incompetent to write code that has unexpected consequences No. That's called "a bug".
- geezerjay 9y ago> No. That's called "a bug". You need to actively go against the most basic aspects of the programming language you're using to force undefined behavior into your code. So, it's not merely a bug. It's the direct result of incompetence, and one which no programmer can pin on his tools or even the programming language.
- amptorn 9y ago> You need to actively go against the most basic aspects of the programming language you're using to force undefined behavior into your code. Adding two ints together is potentially undefined behaviour.
- madez 9y agoElectricity _is_ aggressive in that it does not weigh in the interests of the person and just does its thing, just like C. You can now insult and smear on people that write undefined code in C, but that does not change the fact that undefined behaviour happens in C code and is a source of problems. These problems are worth a solution besides swearing and derision.