So take this definition from master:

(def
 ^{:arglists '([x])
   :doc "Return true if x implements ISeq"
   :added "1.0"
   :static true}
 seq? (fn ^:static seq? [x] (instance? clojure.lang.ISeq x)))

static is used twice here. What is / was the difference? Is it correct
to say that it is now just noise in the code and could be stripped
away? Is it correct to say it has nothing to do with 'dynamic',
contrary to what the last SO post in the topic you linked to implies?

wujek



On Wed, Jan 9, 2013 at 3:24 PM, Philip Potter <philip.g.pot...@gmail.com>wrote:

> On 9 January 2013 08:37,  <wujek.sru...@gmail.com> wrote:
> > 4. what does ^:static do? I read on SO that it is not used any more, but
> the source code in clojure.core still has these, and various tutorials use
> them as well.
>
> This SO thread seems to describe it well:
> http://stackoverflow.com/questions/7552632/what-does-static-do-in-clojure
>
> Is there anything you're still unsure about?
>
> > 5. since when does one need to use ^:dynamic on vars to be able to use
> > (binding [...]) to rebind them thread-locally? Clojure in Action has a
> nice
> > example of a simple mocking framework that uses this feature but without
> > dynamic, but it is about clj 1.2 I think. 1.3 seems to require it though.
>
> You're quite right, this changed in 1.3. It's even the first entry in
> the 1.3 changelog:
>
> https://github.com/clojure/clojure/blob/clojure-1.3.0/changes.txt
>
> which reads:
>
>     1.1 Earmuffed Vars are No Longer Automatically Considered Dynamic
>
> The old convention was that vars surrounded with *earmuffs* were
> automatically considered dynamic and appropriate for a (binding [...])
> form. Now, everything must be explicitly made dynamic using ^:dynamic.
>
> Phil
>
> --
> 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 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

Reply via email to