Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clojure standard metadata attributes

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

Perhaps ClojureDocs could take on this task (suggested).

like image 613
Ralph Avatar asked Jun 17 '11 11:06

Ralph


2 Answers

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.
like image 70
mikera Avatar answered Nov 10 '22 18:11

mikera


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

like image 34
Ralph Avatar answered Nov 10 '22 16:11

Ralph