[Top][All Lists]

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

Re: Trouble with `export'.

From: thi
Subject: Re: Trouble with `export'.
Date: Sun, 03 Jun 2001 17:03:20 -0700

   From: Marius Vollmer <address@hidden>
   Date: 04 Jun 2001 01:02:08 +0200

   The latter problem can be fixed by putting the export after the

       (define-module (mod2))
       (use-modules (mod1))    ;; Make var1 visible with the name name1
       (define name1 123)      ;; Create var2 with `name1' and store 12 in it.
       (export name1)          ;; Put var2 into the public interface of mod2

   Now `export' sees the local variable var2 and uses it.

   This is not a good fix since it is not common practice to write code
   in that way, and it fails silently when not doing it right.  What's
   worse, whether it fails or not depends on what bindings are visible
   from imported modules, which is not a locally visible thing, usually.

well, this style looks very familiar to me since it's what i use
virtually exclusively.  it's difficult to accurately gauge what is
"common", moreso to base your evaluation on this perception.  better to
be algorithmic than heuristical (he says, heuristically ;-).


reply via email to

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