-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 25.09.2011 14:00, schrieb Stuart Halloway: >> 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.
what's the difference between persistent and immutable? > > 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 > > - -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJOfyimAAoJENRtux+h35aGtacQALmFsfHsPuCMt/QZM1gfwMNN e3C0Q2Dju0GgG/PNGTyV25mWII0JGrvl5UK13VLb2q93bNW4l43SeS4glxE1USBd Btbo1QwGiAkIffhSrcXLQT+2K4PM4b0fbLwkF41obAEVEf3JDpMjZ9Qjxbrz9D7v WDH+JBx5rQxvk3ctPqtK59OCkH7fRtMM6bLuwHdFc9YhQt7VjmloaZaAmuXfL3+B sq//dTOuUy94ZZSsERUWWYeqRIvL5gTVkT1QTbElVHCzixH25fnTX8G3b/04bmX6 ME2P/3iSsrYdHfO35caRwQfIm29JYkljwER1vyX0n4iotouodOyTxo4s4du5PZM1 G+xWrzw65ejn3Y6GaSOFjb02wJUhku2cHyXcjY+Xdb3RXNgtTBQurW5Jx+wCmGV5 Kj3GtharuM16n4weCS0aK5meNFFmu8Djn11+cWePyjQ9qVos1ei3f8s01bN13Qbv p1qUh+5D4eJb39A4cETrJpINXIhXf2Ngg7tpyQQjzppT/iqtIVdKHMVFOiazHzh2 1aLFCBRGVoErCukB84fCmwZ9JJP8NiRzyw7choMbNeBREKhX9+WFJfwDZyygrezD kTRa7F2iwz1gEfO3kP8vevdObmtQdQgAMxQ/4IG4xLtmptfL25U/5pgvvi9jOX5T WYY70N5yr64Evgw6Bt9S =y3Ge -----END PGP SIGNATURE----- -- 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