One of the rules of the Scalazzi Safe Scala Subset is “no type casing”; in other words, testing the type via isInstanceOf or type patterns isn’t allowed. It’s one of the most important rules therein for preservation of free theorems. Common functional programming practice in Scala seems to violate this rule in a subtle way. However, as we will see, that practice carves out a very specific exception to this rule that, morally, isn’t an exception at all, carrying convenient advantages...