4 ms·
> You can just use a handwritten parser in any memory-safe language. It’s still probably going to be wrong for a complex grammar, even if it’s not going to lit
by wyager 5y ago
> You can just use a handwritten parser in any memory-safe language.
It’s still probably going to be wrong for a complex grammar, even if it’s not going to literally crash. Bratus et al did a survey of PDF parsers a few years ago and iirc all the popular ones were wrong in ways that don’t necessarily correspond to memory errors (like infinite looping).
> This makes Rust a particularly good choice for writing parsers
In particular, Rust has ADTs, which is the main feature I advocate for this.
- roca 5y agoEven infinite looping is much better failure mode than "villains seize control of your device".