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

The issue isn't whether it's possible to have parsers, but whether it's possible to have them be secure, and periodic CVEs "everywhere" suggest we don't


Aside from memory safety, which is solved by using a compiler that just doesn't allow unsafe memory operations (so not GCC or Clang upstream), which CVEs specifically would have been ameliorated by a parser written in Rust instead of C?


Aside from the fact that it's not solved by using an alternative compiler, why would you put the core advantage aside?


What?


> Aside from memory safety, which is solved by using a compiler that just doesn't allow unsafe memory operations

I don't see how that's possible without turning the language into something that isn't C, either by adding significant new functionality (e.g. fat pointers) or subtracting enough functionality that it's a much less capable language (e.g. disallowing dynamic memory allocation).


Behold: https://fil-c.org/

An important improvement over rust is that "Fil-C has no unsafe statement."


As everything, there are compromises and prices to pay.

In case of fil-c, it is about 1.5-4x slower performance, and a memory overhead.

So, let's not present it as a panacea to all problems: there could good reasons to use it, but it isn't a magic trick.


Rust is slower too, and git is IO bound anyway, and routinely calls bash.


Rust is not 1.5-4x slower at all. Git is not IO bound at all, it is not saturating your IO device, it just performs IO a lot.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: