David Kastrup <d...@gnu.org> writes:

> Mark H Weaver <m...@netris.org> writes:
>
>> Remember, (current-module) is a compile-time concept, not a run-time
>> concept.

I should clarify this statement.  (current-module) is used by the code
that's doing the compiling (e.g. the REPL), _not_ by the code that's
being compiled.  It is a run-time variable used by REPLs and compilers
to keep track of which module should be used to compile the next form.

> Then current-module should probably be a macro, not a function.  In
> which case the tail call problem would take care of itself.

A core syntax form to retrieve the module name baked into a given
identifier (a constant) would probably be useful, and indeed I suspect
we'll have it in 2.0.4 because it'll be needed for Andy's implementation
of `local-eval'.

However, that's a different concept from (current-module), therefore it
would need a different name.  To understand (current-module), please
read my first post in this thread.  It would make no sense as a macro.

    Mark

Reply via email to