>What are meta data used for?
Its a open system it can be used for anything. If you have data about
your data that does not effect equality.

Examples:

The docstrings you can write in clojure are metadata.

(defn my-func
  "my-func does XY"
      [] "whatever")

This will be expanded to metadata like this: {:doc "my-func does XY"}
--------------------------------------------------------------------------------------
The same goes for test.

The are metadata on functions: {:test (fn .....)}
--------------------------------------------------------------------------------------
An example that is used goes like this: if your mining data from the
net and other places you could that onto the data where you got it.

Example:

{:info "this is a good info"} could have the metadata {:source
www.whatever.com}
--------------------------------------------------------------------------------------

You could build a backup system where you tag your data with a
timestamp of the last backup.

--------------------------------------------------------------------------------------

>Are they similar to the reflective API in Java?
No, but you can use those from clojure too.

If you have to compair it to something in java I would say its
somewhat like annotations.
--------------------------------------------------------------------------------------

>Are they related to any FP theory?

No, not that I know of.

-- 
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
  • Meta MohanR
    • Re: Meta Nick Zbinden

Reply via email to