Re: Lisp2Perl - Lisp to perl compiler
From: Pascal Costanza (costanza_at_web.de)
Date: 01/27/04
- Next message: Bill Garber: "Re: Kill The Jews"
- Previous message: Anonymous: "Kill The Jews"
- In reply to: Joe Marshall: "Re: Lisp2Perl - Lisp to perl compiler"
- Next in thread: Joe Marshall: "Re: Lisp2Perl - Lisp to perl compiler"
- Reply: Joe Marshall: "Re: Lisp2Perl - Lisp to perl compiler"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 27 Jan 2004 17:53:48 +0100
Joe Marshall wrote:
> Pascal Costanza <costanza@web.de> writes:
>
>
>>I haven't analyzed the issues in all details, but someone reported to
>>me that my implementation of dynamically scoped functions wouldn't be
>>possible because of the separation of stages in that module system.
>>
>>See my paper about DSF at http://www.pascalcostanza.de/dynfun.pdf that
>>also includes the source code.
>
> From a quick perusal of your code, I see nothing in it that wouldn't
> easily work with the module system.
OK, I have checked my email archive to see what the issue was. Here it
is: In MzScheme, there is obviously no way to access run-time values at
compile time / macro expansion time. (I hope I have gotten the
terminology right here.)
This means that you can't say this:
(define a 1)
(define-macro (foo x) `(+ ,a ,x))
(foo 2)
This will result in a "reference to undefined identifier" error, because
the foo macro doesn't see the a reference.
In my implementation of dynamically scoped functions in Common Lisp, I
make use of this collapsing of stages in order to be able to redefine
existing functions as dynamically scoped functions, without changing
their defined behavior. See my paper for an example how I turn a CLOS
generic function into a dynamically scoped one.
Even if I can go only forward in time, I like the fact that I can change
the decisions I have made in the past. It escapes me why this should be
an evil thing to do in programs.
Pascal
-- Tyler: "How's that working out for you?" Jack: "Great." Tyler: "Keep it up, then."
- Next message: Bill Garber: "Re: Kill The Jews"
- Previous message: Anonymous: "Kill The Jews"
- In reply to: Joe Marshall: "Re: Lisp2Perl - Lisp to perl compiler"
- Next in thread: Joe Marshall: "Re: Lisp2Perl - Lisp to perl compiler"
- Reply: Joe Marshall: "Re: Lisp2Perl - Lisp to perl compiler"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]