[Prev][Next][Index][Thread]

Re: function signature type checking



On Mon, 26 Nov 2001 23:44:02 -0500 (EST), Kim Barrett <kab@camellia.org> wrote:
>At 1:45 PM -0500 11/26/01, Andreas Bogk wrote:
>>
>>I think it could be added to the language quite easily using
>>limited(<function>, ...). The question is whether it would be worth
>>the trouble.
>
> limited(<function>, ...) seems like the right approach.  However, I
> think there are people who would dispute that "quite easily".
> Several people at Apple and Harlequin (and maybe CMU too, I don't
> remember off hand) spent some time working on this, because it
> seemed like a serious hole in the Dylan type system.  However, it
> seemed that every attempt at a specification got arbitrarily hairy
> around variadic parameter lists and return types.  I have memories
> of a whiteboard densely covered with small print purporting to
> describe all the possible permutations...

I can second this. A year or two ago I started to add limited function
types to d2c's runtime, and stopped when I realized how complicated it
was getting. I think that with just a little cleanup of the parameter
list spec your could get a simple and intuitive 90% solution, but that
would involve subtly breaking DRM compliance of a pervasive feature.


Neel



References: