That seems a bit excessive. C doesn't have higher-kinded types or monads
either, *and* it's strict, but we cloned Parsec effectively enough. Neither
parser combinators nor PEG/packrat *require* monads, or even lazy
evaluation for that matter; they're just easier to implement that way. You
can even
I have been meaning to write Rust bindings for Hammer (
https://github.com/UpstandingHackers/hammer), my C parser-combinator
library which is loosely inspired by Parsec and gratuitously rips off
Scala's packrat parser implementation. There is an issue open for it (
https://github.com/UpstandingHack
Hi Andres,
I'm thinking about your question from a structural typing point of view, so
let me see if an analogy from Scala (which has its own take on traits)
helps. Scala is more of an OO language than Rust is, and Scala traits can
extend classes (abstract or not), which is how it's possible for a