There is an open issue concerning local aliases. We may want to consider
restricting imports in such a way that exactly one local alias can be
constructed for each imported symbol.

At the moment, the following is legal in the new IMPORT specification:

  (import Foo (bar as baz) bar)
  (provide FOO bar)

  ;; baz is an ALIAS. The following supplies a definition for Foo::bar:
  (define (baz x) ...)

  ;; Error: bar is an ALIAS for Foo::bar, which is already defined.
  (define (bar x) ...)

It would be fairly straightforward to restrict imports such that an
imported name can only be bound to a single local alias name. This might
actually be useful, because it would let us say:

  (import Foo (collidingName as localSubstitute))
  (import Foo) ;; imports all unimported symbols, which would exclude
                  collidingName, because that is already imported and
                  bound

I'm actually inclined to favor this. What do other people think?


shap

_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to