Looking at the source code here
<https://github.com/ztellman/potemkin/blob/master/src/potemkin/namespaces.clj>
I
can see that `import-vars` delegates to `import-fn` or `import-macro`,
which in turn calls `link-vars`. That uses `add-watch` with a function
described by the docstring:  "Makes sure that all changes to `src` are
reflected in `dst`."

​I haven't seen any problems in using it for a year or so, but the
implementation is not the same as I expected.  Hmmm.

Alan​


On Tue, Nov 7, 2017 at 12:08 PM, Alan Thompson <clooj...@gmail.com> wrote:

> In the Tupelo library, I have been using `import-fn` and `import-macro`
> from Potemkin so that I can define functions/macros in a single namespace
> `tupelo.impl`, but then expose an API in "user-visible" namespaces like:
>
>    - tupelo.core
>    - tupelo.char
>    - tupelo.test
>    - etc
>
> Perhaps I've been doing it wrong and should switch to `import-vars`.....?
> Alan
>
>
> On Tue, Nov 7, 2017 at 10:13 AM, Nick Mudge <n...@perfectabstractions.com>
> wrote:
>
>> I am interested to know if people/you use import-vars to decouple the
>> structure of code from its API.
>>
>> import-vars is from the potemkin library: https://github.com/ztellman/po
>> temkin
>>
>> If you don't use import-vars how do you structure your code and provide
>> an API?
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to