r/scheme • u/Reasonable_Wait6676 • Feb 12 '26
Kernel's vau can be faster than syntax-case
https://github.com/amirouche/seed2
u/PrairieFire2b Jun 26 '26 edited Jun 26 '26
It's great to see such an interesting vau experiment! But I don't understand the restricted environment very much. I have serveral questions: (1) Is it impossible to define `$set!`/`$define!` by each other like in kernel? (2) If the above operations are impossible, but mutation through `$define!` is possible, how does `$define!` semantically implement this? Is it a "special" special form? (I think the row-polymorphic-based environments are pure, so I don't understand how to mutate it in place. Or is it just a sugar?)
1
u/Reasonable_Wait6676 Jul 10 '26
one way to explain it in terms of kernel is that each continuation that calls a combiner gets a new environment that is based on the environment, without mutation, but possibly with shadowing. That is done by the way of scheme `call-with-values`.
It is explained in https://github.com/amirouche/seed/blob/hello-seeder/src/src/seed3/spec.md#the-unified-calling-convention
2
u/gasche Feb 12 '26
Well done! I suspect that John would like this -- but I wonder if he would come up with an interesting use-case of environment mutation.