Post

You should still care about modularity, even if you don't write modular code yourself. Because modularity allows you to reuse modular code written by *others*, so that you can write much less non-modular code yourself. #CGP #RustLang

Good question! The problem is it is not possible to define multiple context-generic implementations of a trait in Rust, due to limitations of the trait system. CGP is a workaround of that limitation. In CGP we make heavy use of trait-only crates, such as cgp-error, perhaps more than normal Rust.

0 reposts0 likes

Yup, you can think of it that way. Though if we just remove coherence alone, there are other problems popping up that makes programming in it less ergonomic. So CGP also has other techniques that work together *with* coherence to make it easy to choose and wire up different blanket impls.