[Prev][Next][Index][Thread]
Re: function signature type checking
At 7:00 PM -0500 11/28/01, Bruce Hoult wrote:
>It may be simply that it was difficult to see precisely what the
>difficulties might *be* until there were actual implementations of the
>language. Real compilers have to deal with function signatures, and
>they do, but the design of how to do it while coping with all possible
>"hair" may have been best found operationally rather than specified
>a-priori.
- The compiler writers may choose to punt on certain corner cases and simply
say it isn't worth the trouble in that case, do something conservatively
correct. I think all of the Dylan compilers I've looked at do this in
some cases, just punting to the runtime system to correctly handle things
once they've been concretized.
- The language specification for function signatures needs to be written in
a way that one doesn't have to be a compiler expert to understand it. The
specification for the compiler's function type manipulation doesn't have
that as a requirement (though its a nice feature to have).
So that's two problems. And they are somewhat related, in that covering
all of the cases seemed to lead to a specification that even compiler
experts were having trouble wading through. I'm not saying that it can't
be done, but I am saying that several attempts at it by fairly smart
people failed. Possibly only for lack of time... But I certainly agree
that this is a significant hole in the Dylan type system, and it would be
a very good thing if it were filled.
References: