On Thu, Aug 27, 2009 at 9:05 PM, Chas Emerick<cemer...@snowtide.com> wrote: > > > On Aug 27, 2009, at 1:34 PM, Chouser wrote: > >> The benefits of #"" producing a real java.util.regex.Pattern >> object instead of some Clojury wrapper will decrease as it >> becomes more common to write Clojure code that can run on >> non-JVM platforms. So although this idea has come up and >> then been abandoned several times before, I think it's worth >> bringing up again periodically to see what makes sense. > > Why wouldn't #"" produce whatever the corollary regex object is on > each host platform?
What methods could you call on such a thing? The answer would differ depending on your platform, making the direct calling of methods on such a thing undesirable as more platforms are supported. > Tangentially, if I think ahead a couple of 'moves', I'd think that > perhaps there's a desire to have clojure code that is thoroughly > portable between, say, Java and .NET host platforms. Yes, exactly, at least for some subset of Clojure functionality. On the one hand, it's probably not worth making Java binary serialization work transparently on a JavaScript host, for example. On the other hand, it'd be nice (and not terribly difficult) to make (re-seq #"x." "x1y2x3") return ("x1" "x3") on nearly every platform being considered. So it'd be nice if re-seq and Clojure's other re-* functions always worked on whatever #"" produced, but it's less important for #"" to have any particular set of native methods. Of course you'd still want to provide a way to get to the underlying platform-specific pattern object for cases where you want to take advantage a platform feature in code that doesn't have to be portable. --Chouser --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---