On Apr 13, 6:36 pm, samppi <rbysam...@gmail.com> wrote:
> In this message (http://groups.google.com/group/clojure/msg/
> d88d9319adfc41a6), Mr. Hickey mentioned a "supported convention for
> tagging, the :type metadata". I thought that this was the function of
> the :tag metadata, though, which isa? and the hierarchy functions use.
> What is the difference? Do their functions overlap, or do they serve
> completely different purposes? Or has :tag been remained to :type?
:tag is applied to source forms to communicate type hints to the
compiler. :type can be used, by convention, to add 'type names' to
runtime data structures that support metadata. The type function will
return the :type metadata if present, else the class, making it a
handy dispatch function. Neither :tag nor :type are used directly by
isa?
Rich
--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---