class Function ?
Jon Fairbairn
Jon.Fairbairn@cl.cam.ac.uk
Tue, 29 Oct 2002 11:42:04 +0000
On 2002-10-29 at 03:21PST Ashley Yakeley wrote:
> At 2002-10-29 02:43, Josef Svenningsson wrote:
>
> >> I'm pretty sure it's not possible...
> >>
> >You mean in H98? Sure no! What I meant was to implement overloading of
> >function application as an extension of H98.
>
> See my earlier message. If function application is overloadable, then
> there must be some operator "funapp" that corresponds to it. But
> operators themselves need function application,
> so you end up with:
>
> f a
> reduces to
> funapp f a
> reduces to
> funapp (funapp (funapp f)) a
> reduces to
> etc.
But we could just make $ the primitive instead of
juxtaposition (and infix the primary form).
Then f a is shorthand for f $ a and it stops there.
--
Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk
31 Chalmers Road jf@cl.cam.ac.uk
Cambridge CB1 3SZ +44 1223 570179 (after 14:00 only, please!)