Clojure reuses some underlying types from the environment it runs into. On the JVM, strings are Java string objects, regular expressions happen to be Java regular expressions. It also reuses primitives types natively handled by the JVM.
This is done for two reasons, efficiency and smoother interop. Have a look at this http://clojure.org/data_structures If you use other Clojure implementations you will find similar type mappings. Luc > I've recently been looking at Clojure, still trying to understand the key > ideas. I went to write some regex code, and was surprised to see that > re-matcher returns a mutable object. > > I am curious about this. It could simply be that creating an immutable > version is low on the priority list. Or, it could be that I'm missing > something basic, and if so, it'd be very useful to understand. > > --Jon > > -- > 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 -- Softaddicts<lprefonta...@softaddicts.ca> sent by ibisMail from my ipad! -- 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