[CM] Question for writing tutorials about S7 environments
iainduncanlists at gmail.com
Thu Jan 14 07:26:10 PST 2021
Thanks Bill, that's helpful. So is the (with-let (rootlet) ...) idiom
something that is unique to S7 then? (or at least, with those functions?)
That has turned out to be really helpful in ensuring that I can separate
load time and run time in Max, even for definitions I want happening at top
one could make namespace-modules by "abusing" anonymous function scope.
I remember this came up a while back on this list (I think Christos was
discussing it?), have you any inclinations to make a more formal module
definition syntax/standard for S7? It might be helpful in terms of
documentation/adoption. I've heard good things in Lisp-internet-ramblings
about Gerbil's module system on top of Gambit. I wonder if that would be
worth checking out. (just thinking aloud here, not proposing!)
At any rate, now that I am over the hump of the nasty Max C SDK coding part
of Scheme for Max (I think! I hope!) I look forward to digging into the
Scheme side a lot more thoroughly. :-)
On Thu, Jan 14, 2021 at 6:14 AM <bil at ccrma.stanford.edu> wrote:
> > Which other Scheme and Lisp implementations have environments similar
> > to S7?
> I don't know of any that are similar to s7, but the underlying
> ideas are not new.
> Both Common Lisp and Scheme have rudimentary support for environments.
> I believe r5rs scheme had null-environment and scheme-report-environment
> (the top-level?), but they are immutable. CL had augment-environment
> (or was this ACL?). MIT Scheme had a way to make a new environment,
> and probably a way to pass it to eval. I think in Guile you can pass
> a module to eval, treating it as an environment. I think you mentioned
> earlier that Clojure had name spaces -- I don't know if they can be used
> by the evaluation process.
> Anyway, it seemed to me that lets,
> environments, name-spaces, dictionaries, etc are all the same thing
> and it would be interesting to make it possible for the programmer to
> use them (as first class environments) during evaluation. A let then
> becomes what other schemes call a module or library. In hygienic macros
> the implementor no longer has to intuit what environment a given name
> comes from. A lot of things become simpler.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Cmdist