On 15/03/2011 05:46, Lucas Dixon wrote:
I'm not sure if this is what you meant, but the type of exceptions is
heterogeneous in the sense that all exceptions, no matter what data they
hold, have the same type.

The query was really about the lower levels where the data structures are untyped but it's worth pointing out the way in which exceptions can be used to get heterogeneous data structures while retaining ML's strong typing.

(btw - does anyone know who came with this idea? I think the first time
I saw it was in the Isabelle source code 10 years ago or so...)

I think it was first pointed out to me when I visited AHL in Uxbridge probably in the late 80's. There was a "universal" type in Poly/ML but it involved some unsafe type coercions. Someone there, probably Simon Finn, realised it was possible to get the same effect using exceptions.

Regards,
David

_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to