freenode/#sicl - IRC Chatlog
Search
8:00:13
heisig
I will try to get some more work done on Trucler this morning. Afterwards, I will be on a one week vacation to https://www.summer-breeze.de/en/
8:07:37
heisig
There is a generic function MAKE-ENVIRONMENT-BUILDER, that takes a client and an existing environment, and returns an environment builder.
8:09:35
heisig
The generic function FINALIZE-ENVIRONMENT-BUILDER takes a client and an environment builder, and returns a new environment.
8:10:09
heisig
This new environment contains all entities that have been added to the environment builder with ADD-*.
8:11:15
heisig
A macro WITH-ENVIRONMENT-BUILDER is provided that hides the calls to MAKE-ENVIRONMENT-BUILDER and FINALIZE-ENVIRONMENT-BUILDER.
8:19:33
scymtym
heisig: if the interaction with the builder is hidden anyway, would WITH-AUGMENTED-ENVIRONMENT or similar be a better name?
8:23:42
heisig
scymtym: The usage will be (with-environment-builder (builder) (add-lexical-variable client builder name identity) ...), so the builder is not really hidden.
8:24:43
heisig
But I agree the name is not perfect. The purpose of the macro is to return the final environment, and WITH-FOO macros are usually not used for their result.
8:28:21
heisig
Oh, and I don't plan on breaking Cleavir 2, especially not before going on vacation for a week :)
8:30:14
heisig
But one day, Cleavir 2 could use the new protocol to avoid allocating a dozen environments for each LET binding. If that turns out to be a bottleneck.
8:37:50
scymtym
heisig: is there a parent environment or is the intended use building environments from scratch?
8:39:09
heisig
scymtym: Yes, there must be a parent environment (which I forgot to pass to the macro).
8:43:56
heisig
Forget about the macro, I see now that it adds more confusion than value. The important part is the environment builder protocol.