Complexity has to live somewhere; but it does not have to live everywhere.| v5.chriskrycho.com
A few years ago, on a whim, I wrote YAIOUOM. YAOIOUM was a static analyzer for Rust that checked that the code was using units of measures correctly, e.g. a distance in meters is not a distance in centimeters, dividing meters by seconds gave you a value in m / s (aka m * s^-1). YAIOUOM was an example of a refinement type system, i.e. a type system that does its work after another type system has already done its work. It was purely static, users could add new units in about one line of code, ...| Il y a du thé renversé au bord de la table !
Paged Out! #4 is out and once again I got to write two articles. This time, my articles are about TypeScript's type system. The first article appears on page 37 and shows a program which only compiles if an array in the source code is a valid magic square. The second article, on page 31 is a continuation and looks at a useful use-case of TypeScript's advance type-system. Enjoy! All the other articles are great, do read the ezine from cover to cover!| Alok Menghrajani