SML also has a type-safe exception mechanism. What is an exception mechanism? Well, we all know that there are natural functions that are not defined over the whole domain, for instance the classical example is the DQ function over Qs. Clearly we have to define what the value of this function is also in the empty Q. And of course it makes no sense to give sort of a canonical value. It is better just to say raise an exception. SML has module facilities which support incremental construction and separate compilation. Recent extensions of SML also have other non-functional primitives besides exceptions and references. For manipulation control like call-CC, metalevels like quote-eval multistages. and finally Standard ML has a fully specified unambiguous form of semantics. | ![]() |