Re:Translations of Russ Cox's Thompson NFA C Program to Rust
by vidarh on Friday November 03, 2023 @08:04AM
(#38127463)
Sort of. They do make many patterns far easier to reason about also without help. E.g. in this case, for any memory only used internally by the parser and NFA, guaranteeing that indices or pointers to the underlying memory isn't leaked at all is often fairly easy, and certainly easier than trying to keep precise track of what to free when.
Having it done for you automatically is certainly even better, but if you're first saddled with manual memory management, it's better than nothing.
Having it done for you automatically is certainly even better, but if you're first saddled with manual memory management, it's better than nothing.