[erlang-questions] Lisp syntax for Erlang

Robert Virding rvirding@REDACTED
Thu Dec 6 23:43:10 CET 2007


On 05/12/2007, Matthew Dempsky <matthew@REDACTED> wrote:
>
> I'm not terribly interested in this thread, but on the topic of syntax
> for calling functions in other modules, have any of you looked at
> Scheme 48's module system?  It already allows you to reload modules at
> run-time without putting any sort of REMOTE-CALL burden on the code.


I checked this out. It is similar to the module/library system in R6RS,
other rather R6RS is similar to it.

If I have understood it correctly. If you have a module foo which exports
the functions a. b and c then you can reference the functions in foo from
another module by doing:

- (import foo)
  Access all the exported functions in foo directly by their name: (a ... ),
(b ... ) and (c ...)

- (only foo a b)
  Only access functions a and b in foo directly by name

- (only foo (a x) (b y))
  Only access functions a and b in foo, but now call them a and y

- (except foo b)
  Access all exported except b

- (prefix foo foo/)
  Access all the exported functions in foo but with their names prefixed by
foo/:
  (foo/a ... ), (foo/b ... ) and (foo/ ...)

You know the exports of foo at compile time and no name clashes are allowed.
The module name can be more complex include hierarchy info and versions etc.

This seems to be more a system for defining libraries then an inclusive
module system as in Erlang, the top program is not in a module.

I think this is what they mean, correct me if I misunderstood it.

Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20071206/b71eb47b/attachment.htm>


More information about the erlang-questions mailing list