I wonder if a reason could be to ensure it’s obvious where a function came
from? For example (foo …) is ambiguous, it could be defined in the current
namespace or it may have been referred from another whereas (my-ns/foo …) is
explicit.
On May 17, 2015, at 08:04, Akiva akiva.sch...@gmail.com
Makes sense. I guess my other question then would be if there are any
benefits to using :refer along with :as.
:A.
Stuart Sierra mailto:the.stuart.sie...@gmail.com
May 17, 2015 at 10:21 AMvia Postbox
https://www.postbox-inc.com/?utm_source=emailutm_medium=sumlinkutm_campaign=reach
Just like
Just like the rest of the article, it's about readability. With `:refer`
you don't know where a symbol came from when you encounter it in the middle
of the code.
–S
On Sunday, May 17, 2015 at 4:05:14 PM UTC+1, Akiva Schoen wrote:
In Stuart Sierra's article here
As stated in the article, I find the extra context of using :as aids
maintenance more than you might expect. The only time I use refer is
if the referred vars are conceptually owned, or the context is
implicit by the name space using them. For me it is about
responsibility and ignorance. :as
It's great to see all of these! Thank you both!
Cheers,
Paul
--
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
In Stuart Sierra's article here
(http://stuartsierra.com/2015/05/10/clojure-namespace-aliases), he
recommends to use :refer sparingly but doesn't explain why this is a
good idea. Only thing I could think of without putting too much effort
into it is that it makes it slightly more tedious when
There's a close parallel in Python, where the same issue comes up of
typically using several modules or packages in a source file and the
language offers a way to import the functions and classes of those modules
in such a way that they can be used without any syntactic marker of their
origin.
I'm using neocons to put some data into a Neo4j database. I need to create
relationships between nodes I've just created and nodes in the DB. I can't
retrieve the nodes based on id without caching them locally, and they're
not unique enough to retrieve using e.g. rest.nodes/find, so I need to
I agree with the general sentiment expressed here, but would just like to
add that `:refer`-ing a few frequently used functions (as Colin Yates
stated, particularly when it's assumed there is strong coupling or
closeness between the two namespaces involved), is a much more minor
nuisance than
Figured it out: `neocons.rest.records/instantiate-record-from` does the
trick.
On Sunday, May 17, 2015 at 7:09:35 PM UTC-4, Sam Raker wrote:
I'm using neocons to put some data into a Neo4j database. I need to create
relationships between nodes I've just created and nodes in the DB. I can't
Hi Atamert,
воскресенье, 17 мая 2015 г., 19:35:57 UTC+6 пользователь Atamert Ölçgen
написал:
I’m new to Clojure async operations (while have a good understanding of
other things) and want to get a bit of advice. Atoms agents still confuse
me.
What I’m implementing is a small REST
You can checkout the new pipeline stuff, I think it fits what you're
looking for nicely:
https://gist.github.com/raspasov/7c9d8f2872d6065b2145
On Saturday, May 16, 2015 at 10:54:16 PM UTC-7, Oleg Dashevskii wrote:
Hi,
I’m new to Clojure async operations (while have a good understanding of
*SECOND NOTICE: DEADLINE THIS FRIDAY!*
*Call For Papers:*
*Scheme and Functional Programming Workshop 2015*
*Vancouver, British Columbia, Canada*
*(Co-located with ICFP 2015)*
http://andykeep.com/SchemeWorkshop2015/
Submissions related to Scheme, Racket, Clojure, and functional
programming are
I'm not sure if this is idiomatic, but I often like to refer any def*
functions or macros, and :as alias the rest. I just prefer the visual look
of a bare def without a prefix. There's usually only a couple of those in a
codebase so it doesn't add too much overhead.
On Mon, 18 May 2015 at 4:05 am
Hello,
I have encountered a somewhat inconsistent behavior when applying type
hinting on an empty vector.
Lucene 5.1 CharArraySet has a few constructors, one of which is
public CharArraySet(Collection? c, boolean ignoreCase)
So I get a reflection warning only in the first case:
1.
Hi,
could anybody please help me to figure out following error with
group-by-key fn?
(defn sorted-tuple [p f]
(if ( (.compareTo p f) 0)
(spark/tuple p f)
(spark/tuple f p)))
(defn tuples-list [[p frens]]
(map #(spark/tuple (sorted-tuple p %) frens) frens))
(- (spark/parallelize
'Turns out I was looking in the wrong place. YeSQL relieves you of all
the clj-time formatting as you can simply add the PostgreSQL cast
directly to your placeholder so this:
-- name: add-birth!
INSERT INTO births (date_time) VALUES (:date_time)
becomes:
-- name: add-birth!
INSERT INTO
Actually, I'm more than a little curious about performance optimizations to my
solution as well[0]. Running Yourkit shows that most of the execution time is
spent in reduce, so I've tried switching to group-by instead. Also tried
replacing with iterate. Neither of these improved overall
Hi Oleg,
On Sun, May 17, 2015 at 6:48 AM, Oleg Dashevskii olegdashevs...@gmail.com
wrote:
Hi,
I’m new to Clojure async operations (while have a good understanding of
other things) and want to get a bit of advice. Atoms agents still confuse
me.
What I’m implementing is a small REST
19 matches
Mail list logo