Scala, Programming, Functional Programming, Type Safety.
Improved version This could be fixed either by using tagging: or value classes: Regardless of which way you prefer, it won’t be possible to swap the arguments anymore: So far so good. But what about other scenarios, like an empty message body or a recipient that doesn’t follow the user or channel