[Prev][Next][Index][Thread]
Re: function signature type checking
At 1:45 PM -0500 11/26/01, Andreas Bogk wrote:
>Ray Blaak <blaak@telus.net> writes:
>
> > It seems that the right way is to declare the type of the
>parameter or result
> > to be <function>.
> > Is there a way to further specialize this?
>
>No, there isn't.
>
>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...
If someone is really interested in pursuing this, I could probably be
persuaded to dredge up any discussions I have archived.
References: