How would you resolve the problem "Rich Hickey" mentioned on the page you linked? "The lack of portability for regexes"... True, *some* regex patterns mean the same thing in the JVM and JS, but in general a regex pattern is not a portable value; it may mean something different to each regex library. Worse (or better), suppose you wrote a Java regex into the EDN file, and tried to read the EDN in JS, and the regex constructor threw an exception?
A slightly more esoteric issue might also arise. https://github.com/edn-format/edn says, "edn is a system for the conveyance of values. ... there are no reference > types, nor should a consumer have an expectation that two equivalent > elements in some body of edn will yield distinct object identities when > read.... Thus the resulting values should be considered immutable, and a > reader implementation should yield values that ensure this, to the extent > possible." > But JS' RegExp is highly mutable, as it blends the features of Java's Pattern and Matcher. In the end, you might as well convey regex patterns as strings in EDN and confront the portability question in whatever way suits your purposes. If regexes were added to EDN, either they would not be real platform regexes, or it would not really be EDN anymore! -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.