On Mon, Dec 7, 2009 at 3:11 AM, Konrad Hinsen <konrad.hin...@fastmail.net> wrote: > On 01.12.2009, at 02:42, Rich Hickey wrote: > >> An updated version of the code for datatypes[1] and protocols[2] is >> now available in the 'new' branch[3]. > > This weekend I finally got around to converting all my deftype-and- > defprotocol-using code to the current Clojure new branch. It is now > more compact and more readable, and the few parts where performance > matters are faster. A big step forward! > >> Small changes include: >> >> - No more use of . in reify/deftype method names >> - No more implicit this in reify/deftype > > That's the only feature that I regret a bit. It looks weird in a > functional language to have functions (or something that is very > similar) that have an implicit argument named outside its definition > (in the :as option). Of course, one can think of it as similar to a > closure over the object, but it still looks a bit weird to me. >
Yes, methods are not really functions. Thinking about them as closures over the object is a good way to go - you can see that analogy in play when you consider recur, which works with these methods, but could not rebind 'this'. The recur case sealed the deal in the decision not to include 'this' in the argument lists. 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 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