IMO using an FP language with a strong strict type system based on algebraic data types, pattern matching and exhaustive checking would be a better approach.
IMO using an FP language with a strong strict type system based on algebraic data types, pattern matching and exhaustive checking would be a better approach.