Re: Who Uses import-vars?

2018-11-15 Thread Didier
So is there another way then using import-vars tp break up an existing package into many new small ones? -- 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

Re: Who Uses import-vars?

2017-11-08 Thread platonovadim
>> An Architect's View -- http://corfield.org/ >> >> "If you're not annoying somebody, you're not really alive." >> -- Margaret Atwood >> >> >> ---------- >> *From:* clo...@googlegroups.com <clo...@googlegroups

Re: Who Uses import-vars?

2017-11-07 Thread Didier
ood > > > -- > *From:* clo...@googlegroups.com <clo...@googlegroups.com > > on behalf of Timothy Baldridge <tbald...@gmail.com > > > *Sent:* Tuesday, November 7, 2017 11:11:14 AM > *To:* clo...@googlegroups.com > *Subject:* Re: Who Uses

RE: Who Uses import-vars?

2017-11-07 Thread Sean Corfield
.com> Sent: Tuesday, November 7, 2017 11:11:14 AM To: clojure@googlegroups.com Subject: Re: Who Uses import-vars? I structure my code very explicitly. Normally the most common constructs are put in a single file named after the library itself (not in core.clj, do that half your files will

Re: Who Uses import-vars?

2017-11-07 Thread Alex Miller
I agree with Tim - I don't like any of the Potemkin import-* functionality. Every time I am working against libs like this, "go to source" ends up in the wrong place. From my perspective, this is a bit of complexity and redirection that serves little purpose other than to confuse those looking

Re: Who Uses import-vars?

2017-11-07 Thread Alan Thompson
Looking at the source code here 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

Re: Who Uses import-vars?

2017-11-07 Thread Nick Mudge
I think import-vars is for convenience. It delegates to import-fn and import-macro. On Tuesday, November 7, 2017 at 12:09:10 PM UTC-8, Alan Thompson 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

Re: Who Uses import-vars?

2017-11-07 Thread Nick Mudge
Thanks Timothy, this is really useful! On Tuesday, November 7, 2017 at 11:11:30 AM UTC-8, tbc++ wrote: > > I structure my code very explicitly. Normally the most common constructs > are put in a single file named after the library itself (not in core.clj, > do that half your files will be named

Re: Who Uses import-vars?

2017-11-07 Thread Alan Thompson
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

Re: Who Uses import-vars?

2017-11-07 Thread Nick Mudge
Thanks Ducan, this is incredibly useful! On Tuesday, November 7, 2017 at 11:17:28 AM UTC-8, Duncan McGreggor wrote: > > > > On 7 November 2017 at 13:11, Timothy Baldridge > wrote: > >> I structure my code very explicitly. Normally the most common constructs >> are put in a

Re: Who Uses import-vars?

2017-11-07 Thread Duncan McGreggor
On 7 November 2017 at 13:11, Timothy Baldridge wrote: > I structure my code very explicitly. Normally the most common constructs > are put in a single file named after the library itself (not in core.clj, > do that half your files will be named core). > >

Re: Who Uses import-vars?

2017-11-07 Thread Timothy Baldridge
I structure my code very explicitly. Normally the most common constructs are put in a single file named after the library itself (not in core.clj, do that half your files will be named core). https://github.com/halgari/odin/blob/master/src/com/tbaldridge/odin.clj Anything not in the API that

Re: Who Uses import-vars?

2017-11-07 Thread Duncan McGreggor
I use it in some large fraction of my Clojure projects (25-50%?). The primary driver is to balance an "internal" organization (e.g., that allows me to keep file line counts low) that would be cumbersome as an API vs. an ideal "developer experience" (e.g., less hierarchy and easier access to

Who Uses import-vars?

2017-11-07 Thread Nick Mudge
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/potemkin If you don't use import-vars how do you structure your code and provide an API? -- You received this message