Monday, September 28, 2015

Multitype has gone!

Version 0.0.3 of the outline doc (https://docs.google.com/document/d/1sNnCvYFjjBmtrl7XF7JX_pdMZ_0ydrctjTR0pO0p5Y4/edit?usp=sharing) has been updated to remove Multitype and replace it with Empty weirdness, based on the fact that Empty is at the bottom of the isA hierarchy, so Empty isA X for any X.

  • [] is a List Empty, so can be used where any List X is required;
  • Option.none is an Option Empty, so can be used where any Option X is required.
  • An explicit closure, { ... }, has type Any=>Empty, and so isA X=>Y for any X, Y.
We've drifted a bit towards dynamic typing, but all is now very straightforward.

No comments:

Post a Comment