Not sure if the source code for this is available but if you want to make your own version I did something similar that can be easily modified and run locally for your own festive mirth: https://github.com/justinhj/rudehackernews
Reader monads have been used to implement dependency injection in Haskell and Scala libraries. A monad in general is the ability to compose two functions that have pure arguments and return values that encode some effect... in this case the effect is simply to pass along some read only environment.
Based on my understanding of above, passing an environment as a parameter is not the Reader monad, in fact passing the parameter explicitly through chains of function calls is what the Reader monad intends to avoid in typed, pure functional programming.
It's way to early to declare Rust and borrow checking as a panacea for systems level languages.
Zig has a solid story for memory safety but makes a different set of trade offs than Rust.
IMHO there is room for a few different approaches to systems programming.
reply