one example use case: validating expressions (valid? '(foo (bar 1))) -> protocol implemented by foo decides if it likes its argument structure
various semantics about the symbol can be encoded in the protocols. On Tue, Jan 8, 2013 at 1:56 AM, kovas boguta <kovas.bog...@gmail.com> wrote: > This is a pretty embryonic idea, but I'm wondering if anyone has > thought the same, or seen relevant examples/literature. > > The idea is: What if we could attach protocols to symbols themselves? > > so (foo '(bar 1)) > > would have its behavior defined by a protocol implemented on the symbol bar. > > This could be a way to create symbolic systems in clojure. > > Besides being of theoretical interest, symbolic systems can be a > composable way to achieve metaprogramming. > > We could instruct that any expression should be first interpreted > symbolically with a tag like #symbolic -- 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