3 ms·
The author said in a comment here that it was written for an FP audience. The example you gave is similar to a discriminated union in ML but it is not as robus
by dfgdghdf 7y ago
The author said in a comment here that it was written for an FP audience.
The example you gave is similar to a discriminated union in ML but it is not as robust because the language will not check that every match expression (probably an if-instanceof-ladder in Java) handles every case.