[plt-scheme] conditional module inclusion and compilation
On Sep 2, 2009, at 7:52 PM, Eli Barzilay wrote:
> Compiling files will save you the compilation cost so if you run long
> processes there's no real difference.
Good -- that's what I thought and the same as compilation in CL, but I
didn't know if there was some other reason for creating .zo files. In
the case of my current project compilation takes less than a second
and runtimes will often be hours, so it's not an issue.
> You have the freedom -- you can even do a reader thing similar to the
> CL #+ -- but the default makes it harder to trip on these bugs (which
> can get very nasty).
Understood. Part of my attitude is probably just from being a newcomer
and feeling, probably often out of ignorance, like it's harder to do
some things I'm used to doing in CL (e.g. in areas like writing macros
with arbitrary expansions, using eval, and splitting code over
multiple files without having to think about modules). In many such
cases I'm probably just wrong, but I do think there's more of a focus
on safety in this community. This is probably for the good in most
situations, particularly when people are developing large software
systems that will be used by others, but it can also sometimes feel
constraining, particularly when developing small experimental systems
for one's own use.
-Lee
PS Just to clear up something really minor from a previous post, my
description of a CL solutionwould only really have made sense if both
of these functions had the same name:
> #+:MACOSX(defun report-plot () <do stuff here that produces graphics
> using stuff in the plot module>)
>
> #-:MACOSX(defun report () (values)) ;; just do nothing if I'm not in
> macosx, which also means I don't have the plot module
--
Lee Spector, Professor of Computer Science
School of Cognitive Science, Hampshire College
893 West Street, Amherst, MA 01002-3359
lspector at hampshire.edu, http://hampshire.edu/lspector/
Phone: 413-559-5352, Fax: 413-559-5438
Check out Genetic Programming and Evolvable Machines:
http://www.springer.com/10710 - http://gpemjournal.blogspot.com/