Exploring 4 Languages
Rust, Elm, Reason, and F⯠â a bunch of cousins!
Today, as I hit the first of the implementation chapters in Domain Modeling Made Functional, I started thinking about how I wanted to implement it. As Iâve noted elsewhere in the past, very little of the book is truly specific to Fâ¯, though thatâs the language Wlaschin uses in the bookâand Wlaschin himself agrees:
Thanks! Yes, itâs true that you could easily use #ElmLang, #RustLang, #Scala, or especially #OCaml to work through the book. I use hardly any F# specific features.
So⦠I decided to try something a little bit bonkers. Iâm going to implement these exercises in four different languages:
These languages are all related: theyâre descended from Standard ML. ReasonML and F⯠are like siblings: Reason is merely a custom syntax for OCaml; F⯠is (originally) an implementation of OCaml on .NET (though the two languages have diverged since F⯠came into existence). Elm and Rust are cousins of each other and of Reason and Fâ¯, though theyâre both drawing on other languages besides OCaml as well. I also have some familiarity with Rust, Elm, and F⯠already, and have read the docs for Reason a couple times. So this is a bit less crazy than it might otherwise be.
Why, though? Mostly because I think itâll be interesting to compare the implementations of the domain model from the book side by side. Itâll look just a bit different in each language, and I expect to learn a bit more of the feel of each language by doing this. (That side by side comparison is something Iâve done before and found very profitable.) Iâll also turn it into blog posts, which hopefully will be interesting to others!
More to come, and soon.