开发者

Clojure standard metadata attributes

Is there a "standard" list of metadata attributes (:author开发者_JAVA百科, :copyright, etc.) for Clojure, or do I need to read the source code :-)?

Perhaps ClojureDocs could take on this task (suggested).


There are no hard and fast rules that apply across the board - metadata is "context dependent" so can have different meanings depending on what kind of object you attach it to.

Note that the Clojure website section on metadata explicilty notes that metadata is for "arbitrary annotation of data".

Some comments:

  • In certain parts of Clojure, metadata is meant to be used in a particular way. A good example is the metadata on vars described in Ralph's answer.
  • If you define your own library with objects that have metadata, you can make the metadata mean anything you like.


The best I've been able to find so far is http://clojure.org/special_forms.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜