> the website says: > > deftype supports mutable fields, defrecord does not > > so deftype seems to be what would be a java bean with simple > properties in java
Nope. :-) Domain information should use defrecord, and should never be mutable. This is the closest thing to a Java bean, but is radically different in being (1) immutable, (2) persistent, and (3) accessible generically as a map. Game state would modeled with defrecord. deftype is for things like custom data structures. In a Clojure-in-Clojure implementation, deftype would be used to implement maps, vectors, and lists. deftype's mutation ability would be used to implement transients. Stu -- 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