• If only there was some kind of way for all libraries to be parameterized over the runtime

    Fun fact: Graydon Hoare wanted Rust to have ML-like first-class modules!:

    Traits. I generally don’t like traits / typeclasses. To my eyes they’re too type-directed, too global, too much like programming and debugging a distributed set of invisible inference rules, and produce too much coupling between libraries in terms of what is or isn’t allowed to maintain coherence. I wanted (and got part way into building) a first class module system in the ML tradition. Many team members objected because these systems are more verbose, often painfully so, and I lost the argument. But I still don’t like the result, and I would probably have backed the experiment out “if I’d been BDFL”.

    Makes me curious how such a Rust would have turned out, especially if some of the more modern OCaml module features mentioned in your link were implemented.


    score 1 · canonical