You'd be surprised how much code you can move from conditional instructions to
data types if you have a good type system, and if this type system is a static
one, you get it checked before your program even starts.
F# has this too. Other languages too, of course. Heck, even Pascal has a limited form of it - enumerated types and user-defined array types etc. - years ago.