[prev in list] [next in list] [prev in thread] [next in thread] 

List:       racket-users
Subject:    [plt-scheme] first-class methods
From:       robby () cs ! uchicago ! edu (Robby Findler)
Date:       2004-11-28 23:21:31
Message-ID: 20041128232132.6A1736C9FD () laime ! cs ! uchicago ! edu
[Download RAW message or body]

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 :).

Robby


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic