Category Flow

The hunt for an immutable, type safe data record in JavaScript

Ever since working with Scala’s case classes I was hooked on the idea of having a type safe data record that was also immutable. What’s not to like? It’s type safe and immutable (duh). So I wanted to see if I can get the same thing in JavaScript - the most mutable and dynamic language known to man. class Person { givenName; familyName; } This will serve as our starting point: a simple class in JavaScript.