← Back to context

Comment by marhee

1 day ago

> You can't valgrind kernel space > Linters might be helpful, but I don't remember there being good free ones

I should have Googled:

https://www.kernel.org/doc/html/latest/dev-tools/

So many tools here. Hard to believe these cannot come close to what Rust provides (if you put in the effort).

Rust forces you to encode much more explicitly information about lifetimes and ownership into the code. Tools can only do so much without additional information.

Those solve a bunch of problems and can avoid a lot of issues if used properly, but it's time-consuming and cumbersome to say the least. Nowhere near as seamless or holistic as what Rust has to offer.

  • > but it's time-consuming and cumbersome to say the least

    Only when writing code (and not even that: only when doing final or intermediate checks on written code). When reading the code you don't have to use the tools. Code is read at lot more then being written. So if tools are used, the burden is put only on the writer of the code. If Rust is used the burden of learning rust is put both on the writers and readers of the code.

    • The same information that is useful for compilers (like rustc) and linters to reason about code, is also useful for humans to reason about code.

    • I find reading Rust much easier than writing it. It’s not actually that complicated a language; the complexity is in solving for its lifetime rules, which you only do when coding.