Hi Kovas,

I considered the problem of what to do with undefined tags when I 
implemented this, but I didn't have a clear idea of what the result type 
should be, so I ignored it.

I also didn't know what to do with the metadata. For example, on the JVM, 
you can't put metadata on Java types like String or Date. If there's 
metadata on the tagged type, do you try to preserve it? For that matter, 
what does the reader do now if you try to put metadata on a tagged literal 
that evaluates to a type which doesn't accept metadata? I assume the reader 
blows up there too.

Other similar tagging systems allow undefined tags to be passed through, 
and I think this is the right approach. You can represent any tagged 
literal as a <symbol, data> pair, and this pair deserves its own type. I'd 
call it TaggedData. It should implement the interface that handles metadata 
(IObj in Clojure on the JVM I think).

I like the idea of being able to define how tagged literals should be 
emitted without mucking about with strings. At first glance, your approach 
seems reasonable.

Are you on Clojure/dev? To move this forward, you can put a design proposal 
on dev.clojure.org. Keep in mind that tagged literals went through months 
of discussion before the implementation: 
http://dev.clojure.org/pages/viewpage.action?pageId=950382
-S

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