[Bug 3830] Static typing of function declarations (K-Function-Prolog)

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3830





------- Comment #8 from mike@saxonica.com  2006-12-13 11:39 -------
I'm no expert, but I think the difference for the inconsistency that Frans
notes is that functions can be recursive, but variables can't. If you infer the
static type of a function result from its body, then you need some mechanism to
ensure that the inference terminates - which is easier to do in a real product
than in a specification. (IIRC in Saxon I simply probe only one level deep -
that is, I look at the function body but not at the internals of any functions
that it calls.)

Received on Wednesday, 13 December 2006 11:39:52 UTC