[plt-scheme] Where is macroexpand in PLT Scheme?

From: Dor Kleiman (dor at ntr.co.il)
Date: Wed Nov 12 07:38:22 EST 2003

The expander expands code in the editor. Its source is kept in a variable that is part of the editor. That variable is probably what is defined in colorer.ss

-----Original Message-----
From: Bill Clementson [mailto:bill_clementson at yahoo.com]
Sent: Wednesday, November 12, 2003 6:35 AM
To: John Clements; Robby Findler
Cc: Bill Clementson; PLT List
Subject: Re: [plt-scheme] Where is macroexpand in PLT Scheme?


  For list-related administrative tasks:
  http://list.cs.brown.edu/mailman/listinfo/plt-scheme


--- John Clements <clements at brinckerhoff.org> wrote:
> 
> On Tuesday, Nov 11, 2003, at 21:27 US/Eastern, Robby
> Findler wrote:
> 
> >   For list-related administrative tasks:
> >  
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >
> > At Tue, 11 Nov 2003 17:21:20 -0800 (PST), Bill
> Clementson wrote:
> >> It seems odd that it always shows up as
> colorer.ss or
> >> #f. Maybe it is getting confused somewhere and is
> >> using the filename of the last editor object that
> was
> >> used (in this case, the syntax colorer?)?
> >
> > No DrScheme's got it right, I think. All of your
> source is either some
> > unknown place or the definitions window.
> 
> I think it confuses some folks that references to
> the definitions 
> window contain the letters "colorer.ss".

It definitely confuses me.

> If (like I was) you are confused, here's what's
> going on:
> 
> MzScheme provides a powerful 'mixin' facility; at
> runtime, a mixin 
> applied to a class yields a class.  This facility is
> used widely to 
> extend DrScheme's functionality.  That is, to extend
> the 'DrScheme 
> definitions text% class', you supply a mixin that
> can be composed with 
> that class.  Instances of the resulting class are
> assigned the source 
> position of the last applied mixin.
> 
> So, references to the definitions-text% show up as
> strings containing a 
> reference to the file containing the last-mixed-in
> tool.

But, isn't the expander confusing (I was about to say
"mixing up", but I limit myself to one bad pun a day)
an editor mixin with application code? The expander is
supposed to be expanding application code, not editor
code. Why is it showing the source file location for a
mixin that has modified the editor tool?

> FWIW, for a long time the stepper was the
> last-mixed-in tool.  This led 
> to lots of finger-pointing from the uninitiated.

At least I'm not the only person who has been confused
by this ;-).

--
Bill Clementson


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree


Posted on the users mailing list.