murtaza52
murtaza52

Reputation: 47441

What does the prefix :: mean

I have seen the following prefix :: what does it represent? A :abc is a keyword, but what is ::abc ?

Thanks, Murtaza

Upvotes: 10

Views: 312

Answers (2)

amalloy
amalloy

Reputation: 92117

Suppose that the current namespace is my.app. Then, ::x is a reader shorthand for :my.app/x, a keyword whose namespace part is my.app and name is x.

Upvotes: 14

rekire
rekire

Reputation: 47985

In other languages this is the default namespace. But not sure if this exists in Clojure too. Refering to this comment, it seems to be correct.

Upvotes: 1

Related Questions