Scala, Programming, Functional Programming, Type Safety.
adoption path on a simple example of IM Message: So, we have a case class representing a message, where the constructor takes two strings: recipient (user or channel) and message body: So what’s the problem? Well, it’s easy to unintentionally mix the arguments and create an incorrect instance: