> > Very, very cool. Is this just sugar for map pattern matching? >
I use only vector matching. When I define a datatype, for instance: (defdatatype ::Type Constant (Expr x y)) I create symbols Constant, with value ::Constant and Expr with value (fn [x y] [::Expr x y]). That way I can use the symbols as functions and constants in the action part and, via translation of the patterns, in the pattern rows. I'd like to fully support types/records as they provide significant > performance benefits. Probably won't happen in the near, near future - > unless of course somebody wants to take a stab at it :) > I considered the idea to define, inspired with your example with dates, a class for each type, but I preferred to try first a simpler implementation using vectors. Juan Manuel -- 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