On Wed, Jan 5, 2011 at 9:40 PM, Stuart Halloway
<stuart.hallo...@gmail.com> wrote:
>> On Wed, Jan 5, 2011 at 8:00 PM, Stuart Halloway
>> <stuart.hallo...@gmail.com> wrote:
>>> All the code you are referring to is in clojure.contrib. Note the comment 
>>> at the top of the files:
>>>
>>> ;; DEPRECATED in 1.2: Promoted to clojure.java.shell
>>
>> At the top of which files? If you mean the library's source code, it's
>> very likely he didn't read a single line of it -- just installed the
>> contrib jar along with Clojure and then :required or :used it.
>>
>> If something people have been using in version x is deprecated in
>> later version y, this needs to be announced somewhere more prominently
>> than in its source code, like, oh, say, the main documentation page.
>
> This is partially in place already. Deprecated namespaces are marked as such 
> with {:deprecated true}, and the top of the documentation page shows this 
> (e.g. http://clojure.github.com/clojure-contrib/shell-api.html).
>
> However, the styling of the deprecation warning is such that it can be easily 
> missed.

The granularity is limited to whole namespaces?

Ick.

How about:

{:deprecated true} metadata can be attached to any var.

(defnd ... ) sets this, so you can just change "defn" to "defnd" to
deprecate a function.

Deprecation shows up in the generated docs, along with the arities,
docstring, etc.; and that includes on generated web pages like those
for the contrib libraries.

On generated web pages it can show up in blinking red 100 point Gothic
if you like.

And the compiler emits a warning when it compiles something that
references a deprecated var, just as it does if *warn-on-reflection*
is set and it compiles an interop call that needs reflection.

-- 
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