Where would Rust be in this chart?

I wonder if someone here has read the book Concepts, Techniques, and Models of Computer Programming and could comment on this chart regarding Rust and where you would place it within that chart? I just started reading the book, but the language they use for teaching, the Oz language from The Mozart Programming System, seems to be fun and they use it to explain all (or some of) the concepts from the book ...

It'd be probably next to OCaml on this chart. The original Rust compiler was written in OCaml, and has been influenced by it.

It could also be in a couple more places, because a few other styles of programming are possible in Rust, but from Rust's perspective these are just library features (like actors or message passing).

2 Likes

@kornel Thanks for your answer and opinion on that topic. Interesting indeed.

It won't be exactly where OCaml is: OCaml doesn't have threads. Rust would be one box bellow, in "shared state concurrent programming".

5 Likes

That's true; however, just because the language was written in OCaml at one time (which was long before 1.0, and lots of changes happened in-between) doesn't mean it is like OCaml (even tho it is in some aspects, but there's no direct consequence relation here).

Rust's pattern matching is more OCaml than Haskell both syntactically and wrt. exhaustiveness of matching. The parametric polymorphism, ADTs, type inference is standard among languages derived from ML (except that Rust doesn't have full blown global type inference by design, but could...). Here, "derived from ML" includes Haskell. The memory model is clearly more in line with C / C++. However, the whole trait system arguably takes Rust closer to Haskell than to OCaml in terms of lineage.

As for the chart, @matklad is probably right.

Note that that chart is about runtime features language has, not about it’s connections with other languages.

If you are interested in connections, take a look at the diagram on the third slide in this presentation: https://github.com/Sparrow-lang/sparrow-materials/blob/master/PhD/presentation_offline_Sparrow.pdf

2 Likes