Modules
I noticed there's a new version of Arc. According to the web page, "The most dramatic change is probably the ability to use x.y and x!y as abbreviations for (x y) and (x 'y) respectively."
The x.y syntax reminds me of one of the things I miss in Scheme: a "Pythonic" module system. By "Pythonic" I mean, that you can import modules, and get a module object back, that you can access using x.y syntax. I'm mostly interesting in the namespace issue here, as the convention in Scheme seems to be, to just stick everything in the global namespace.
In other words, I am somewhat uncomfortable that it's not possible to do this:
;; --- foo.scm --- (define (bar x) (+ x 1)) ;; --- REPL --- > (import foo) > foo #<module foo> > (foo.bar 3) 4 > foo.bar #<procedure (foo.bar x)>
...or something to that effect.
Maybe this is an irrational "need", but I like namespaces, and have gotten used to them over the years, and loading the toplevel namespace with lots and lots of definitions just seems a bit "unsafe" to me.
I found a comparison of Python's and PLT Scheme's module systems, which explains the issue better:
Once we've done '(require (lib "math.ss"))', we have access to the internals of the math library. But there's one surprise: unlike Python, 'math' itself is not a first-class object. By default, the require form has the same semantics as Python's "from [module] import *"!
The article then mentions the following technique to add a prefix to the names imported from a module:
> (require (prefix math. (lib "math.ss" "mzlib"))) > math.e 2.718281828459045
I suppose this would not be too bad as an alternative, although you still cannot do things like inspecting a module, pass it around, etc. Chicken does not seem to support it though, and Schemers generally don't seem to miss the feature. (Or maybe there's a reason why it would be a bad idea in Scheme.) So maybe I should just learn to live without it. Thoughts welcome...

