News for hackers. Stuff that matters.
Re:I love coding in C by pjmlp on Thursday December 26, 2019 @12:48PM (#21885428)
It all boils down to:

Σ UB + Σ memory_corruption + Σ logical_errors ≥ Σ logical_errors

Re:I love coding in C by klingonopera on Thursday December 26, 2019 @05:51PM (#21887541)
Very nice, but I'd nitpick memory corruption and expand it to hardware errors, or add that category.

Sending digital signals over analog medium (read: always) can fail, and may do so regularly depending on hardware itself and environment conditions.

Simple examples: Digital 3.3V signals sent over 10m, high-capacity lines (lose a bit here and then), or an overclocked CPU undervolting just at the right time, etc...

EDIT: I'd also argue that UB is a type of logical_error. Not the fact that UB exists within the language, but in that the logic failed to account for the scenario?

Re:I love coding in C by pjmlp on Friday December 27, 2019 @07:02AM (#21890840)
Except that unless we are talking about hardware design languages, no programming language accounts for hardware errors as such.

UB is its own kind of error, specially since ISO C documents over 200 use cases, and unless you are using static analysers, most likely won't be able to find out that are failing into such scenarios as no human is able to know all of them by heart, whereas logical errors are relatively easy to track down, even by code review.

Re:I love coding in C by jacquesm on Thursday December 26, 2019 @01:56PM (#21885842)
Very true.

But every language that can reach the hardware will have the ability to wreck things in spectacular and hard to predict ways. Every new language ever was touted as the one that would finally solve all our problems. For Java and COBOL the historical record borders on the comical. I have no doubt that the same will go for every other language that we just haven't found the warts in yet. Two steps forward, one step back, that seems to be the way of the world in the programming kingdom.