[plt-scheme] first-class methods

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sun Nov 28 18:21:31 EST 2004

At Sun, 28 Nov 2004 18:01:34 -0500, Dave Herman wrote:
> >>It looks to me like you could make this work by having method
> >>declarations expand both to their current implementation and to an
> >>identifier macro that expands purple? in argument position to (lambda
> >>args (apply purple? args)). Why wouldn't this work?
> > 
> > That would work, but would introduce a surprising performance penalty.
> > Better to make people write the lambda themselves, imo.
> Fair enough. On further thought, it wouldn't even be usable outside of 
> the lexical scope of the class declaration, since the macro would be 
> local, meaning that it wouldn't even work with subclasses. Feh.

The inherit declaration would introduce the macro in subclasses (but I
still don't like it :).


Posted on the users mailing list.