chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] compiled syntax modules


From: Alex Shinn
Subject: [Chicken-users] compiled syntax modules
Date: Thu, 03 Apr 2008 15:32:15 +0900
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin)

I've just checked in a new version of riaxpander with
initial support for compiling syntax extensions.

Previously, any file containing macros that you wanted to
export you would mark as (syntax) in the .setup file, and
just install the file as a .scm without compiling it.

Now, when using riaxpander, you have the option of compiling
the file with the -Dcompile-syntax option and it works the
same way (for all macros, including syntax-rules,
explicit-renaming, etc.).  There's an example in the wiki
documentation.

The compiled syntax can only be currently used only with
riaxpander (though I'm considering adding support so that it
can be loaded from the syntactic-closures egg as well).
Because of this, you probably don't want to make published
eggs compiled, since it removes the option of using
alternate macro systems.  It can be useful for private code,
though.

The effect of this is to speed load-time, and for complex
macros speed expansion (compile) time.  It won't make any
resulting code any faster, it just speeds up the development
process.  It's also essential if you want to distribute
proprietary macro code, and is the first step towards a
proper module system.

Even if you don't compile any syntax yourself, users of
riaxpander will notice a huge difference in that riaxpander
now loads *instantly* (because it of course compiles all its
own syntax), whereas all the other hygienic macro systems
take forever and a day to load.

-- 
Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]