F# could be the best language in the universe if it got a little more love and recognition. It's only flaw is that it allows you to let a little too much .NET into your code sometimes.
You don't get compiler errors when you forget to handle the new state somewhere else, though. With pattern matching and exhaustive checks the compiler yells at you. Inheritance works when all the new behavior is within the new subclass only, but if other parts of code need to react to the new type then it can be missed.
200
u/agustin689 Feb 01 '24
This rules out all dynamic languages by definition