Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you're redoing the c std, which was my initial point, you can introduce a debug allocator with metadata about object layout. Coupled with some debugger support, i'd imagine you can get there. And if the C std was willing to allow constexpr to do more at compile time, you wouldn't need explicit debugger support and could just use constexpr to modify the compiler.

There's also nothing stopping debuggers reifying the C at debug-time into this metadata.

My claim is 95% can be fixed by just normalizing what is current practice at the stdlib level and compiler level. By extending constexpr, i think you could get to 100%. Given that this is the case, why even both with the nightmare of Rust.



Oh, you sounded like you were talking about something that already exists today, rather than something that you'd like to exist. The main problem with taking dynamic verification all the way is making it work with ABI boundaries, which won't be going anywhere in at least the next decade. You'd need everyone to migrate to a universal ABI that can convey all needed metadata, and while I've seen a few proposals for that, none of them have gone anywhere.


I was more saying that the scope of issues mainstream tooling catches, includes ones that the rust compiler doesn't catch, and many more than enough for what are common memory safety issues -- there are some issues that aren't caught, sure -- but the operations which can cause those bugs are well-defined, most programs wouldnt have to use them, and a new std lib would help.

When people propagandize about C, they're universally unaware that the normal process of development basically addresses most of the problems Rust is supposed to be solving, and more than the rust compiler alone solves. The remainder are 95% to do with libc, which should just be thrown out.

A smidge more compile-time eval with constexpr, and the use case for Rust could disappear. It's a great shame that C is run by a standards process that's determined to relegate it to electric motors and digital watches from the 80s.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: