Why does C get flak for UB and memory-unsafety while all the new popular languages have a fucking eval()?!?
Banning large classes of memory corruption in C is also easy. People don't do it.
-
-
Banning eval in a program that handles _crash dumps_ should have been a no-brainer. Oops.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
If you can't do it with a trivial git hook then it's not easy. Has to be automated and can't make programming ridiculously hard.
-
Banning *large classes* of memory corruption also still leaves you with the disaster of many remaining memory corruption bugs.
-
It's definitely possible to make a safe dialect of C where you need to annotate things for it to pass verification.
-
i.e. a subset, where annotations (magical types / comments) can do full verification of memory safety via a compiler with it.
-
But what does that accomplish? Effectively a new language since nothing will actually work, and it'll be way worse than Rust.
-
Even things like arithmetic get super painful. It'll need to force usage of functions to do it whenever it can't prove it safe.
-
Same thing with bounds checking for indexing, passing around pointer + size pairs, etc. It has to make everything a PITA to do.
-
Rust is pretty much the result of doing that, while making it a modern language. Subjective parts are mostly syntax choices, etc
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.