[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: module naming
From: |
Rob Browning |
Subject: |
Re: module naming |
Date: |
24 Apr 2001 15:33:08 -0500 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
thi <address@hidden> writes:
> i would hope that the if/when-to-run-code issue is separate from the
> visibility issue. hmmm.
Well, currently, the symbols aren't visible until the relevant .scm
file is loaded, and that's when the top-level code runs. If we wanted
import-from to work even without a "use-modules" statement, then we'd
still have to have specify when the top-level code executes. My guess
is upon reaching the first use-modules *or* import-from statement
mentioning a given module.
> actually, this is what i would advocate as the best interface possible
> because it completely specifies module dependency and bindings selection
> and yet maintains backward compatibility to a no-granularity form. to
> combine the import and renaming examples:
>
> (use-modules (foo bar)
> :select (x y (a new-a) (b new-b) z)
> :rename (lambda (sym) (symbol-append 'foo: sym)))
>
> we would need to specify that selection occurs before renaming. if the
> select-clause is omitted, the default would be to use the entire exports
> list. this way, degenerate `(use-modules (foo bar))' works as before.
Seems reasonable, though I think it might be useful to support an
in-line/programmatic import-from command to parallel our export
command. This makes some code easier to write, and is friendlier to
automatic code generation too.
--
Rob Browning <address@hidden> PGP=E80E0D04F521A094 532B97F5D64E3930