guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Planning work


From: Marius Vollmer
Subject: Re: Planning work
Date: 28 Apr 2001 13:47:23 +0200
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7

address@hidden (Thomas Bushnell, BSG) writes:

> In Lisp, symbols are localized in modules by : syntax...generally you
> ask for symbol foo in module bar with the syntax bar:foo.

Note though that in Common Lisp, they have a package system that
manages the mapping from strings to symbols, while in Guile we have a
module system that manages the mapping from symbols to top-level
bindings.

This is a fundamental difference, so I thought I'd mention it before
confusion arises.

> Is that syntax in use in guile?  I see it, but is it merely a
> convention, or does it have syntactic import the way it does in Lisp?

It's a one of the conventions for accessing structure fields.
Personally, I like the dash convention better: `stat-atime' instead of
`stat:atime'.  This is what almost everybody seems to be using.


A detailed plan is lacking, but I (again personally) could imagine
having support from the module system for naming conventions.  For
example, we could have two ways to import bindings from a second
module: one would make them available with the names the bindings have
in the second module (like `use-modules' does now), checking for
conflicts; another one could construct new names by prepending a user
specified prefix, like

    (access-module (foo bar) foo)

This would make all bindings from (foo bar) visible with names like
`foo:X' where `X' is the name the binding has in (foo bar).

So IMO, we should not have special syntax in symbol names, but we can
have support from the module system for some naming conventions.

If it ever turns out that having a gazillion symbols with a common
prefix is inefficient, we should tune our symbol implementation to
deal better with it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]