Why Nostr? What is Njump?
2024-07-20 10:47:47
in reply to

Hector Martin on Nostr: My point is that you *can* do those things in Rust and you *can't* in C. The actual ...

My point is that you *can* do those things in Rust and you *can't* in C.

The actual crash here was a NULL deref. That is one of the most classic footguns of memory-unsafe languages (not just those, also others like Java for some reason). In Rust there are no NULLs, only explicit Option<T>s, which *force* you consider the case of there being no value. Yes, you can still just turn it into "panic if no value" but making it an explicit *decision* that the programmer has to make means it's a lot less likely to happen by accident, and it also means you can outright ban that choice by policy and technical means.
Author Public Key
npub1qk9x6yrvten3jqyvundn7exggm90fxf9yfarj5eaz25yd7aty8hqe9azpx