top | item 47044107

(no title)

Panzerschrek | 13 days ago

Making C compilers better and more predictable is impossible with so many UB cases listed in the standard. A better language should be used instead, where UB and implementation-defined behavior cases are minimized.

discuss

order

uecker|13 days ago

Where there is UB in the standard it means that a C compiler is free to define the behavior. So of course, somebody could write a C implementation which does this. See also Fil-C for a perfectly memory safe version of C. So the first sentence makes no sense.

But also note that there is an ongoing effort to remove UB from the standard. We have eliminated already about 30% of UB in the core language for the upcoming version C2Y.

Panzerschrek|13 days ago

C is designed in such a way, that designing a safe compiler without big performance penalties isn't possible. How much Fil-C is slower compared to something like GCC? 2 to 5 times slower?

dotancohen|13 days ago

Have you seen Rust? I'm loving it.

uecker|13 days ago

Rust is not super appealing to me as C user: too complex, slow compilation, etc.