> This construct is not very good. make-record is not first-class (It > cannot be used as an argument to a function). > Its first argument is not first-class (it has to be statically the > name of a class). > > Good point. I am not happy with my own version because it is a pure run-time function with run-time dispatching all the time. What I am hoping for is the compiler can be smart enough to just do compile time dispatch for the static case, but still do run-time dispatching for dynamic cases. So it will still be a first-class function. The only difference is the compiler takes a short-cut for the static cases. The programmer should see no difference.
> It exposes an implementation detail to client code (the name of a class). > > I agree that is true. But as I said before, that may not matter for many cases (for me, that is the vast majority). I am willing to trade the flexibility for better code organaization and readability. If flexibility is all free, of course that will be ideal. But flexibility often comes with a price, sometimes in terms of performance, sometimes in terms of code readability and etc. One size fits all is too simplistic to me. -- 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