[CM] srfi 212 - define-alias
Christos Vagias
chris.actondev at gmail.com
Thu Oct 1 18:44:16 PDT 2020
Hi all,
i stumbled upon srfi 212 which speaks of aliases.
" An alias definition transfers the binding of one identifier to another,
effectively aliasing the identifier."
https://srfi.schemers.org/srfi-212/srfi-212.html
I think that would be a great help for the concept of libraries/namespaces.
In the r7rs define-library concept, you can import a library and have
access to its "exported" symbols.
If these exported symbols are aliases, we could have hot-reloading
redefinition of a library's symbols (redefining a function) and have this
change reflected on the places where it's used.
This is one feature from clojure I really missed in scheme.
In my work on s7-imgui I do this but with the hack of making the "imported"
function a macro that resolves the functions' symbol from the environment
where it's defined.
But, aliases would be a more subtle solution.
-- excuse the long text, it's quite late yet something on my mind for
quite a while
Christos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20201002/f30dcc37/attachment.html>
More information about the Cmdist
mailing list