Learning about Phantom Types

Posted on April 1, 2019

Well, another month has passed, and it wasn’t a particularly good one! I ended up getting the flu, which put me out of commission for a while. As a result, I decided that this month’s post would be a bit different. I asked a friend of mine to help me record this video about phantom types, where I make an attempt to translate a page of Haskell material into Rust. I figured it would be a good opportunity for me to learn a bit about phantom types myself, get in some more Rust practice, as well as teach someone else who is less familiar with the concepts in this space some new techniques. What I didn’t really expect to do was pull up scalafiddle and go through some examples in Scala, so it ended up being sort of a nice exploration of how certain concepts are expressed in 3 different languages. Anyway, I think it was a fun little recording session and I think it will be informative for some people.