On Jun 8, 2012, at 10:58 AM, Stuart Sierra wrote:

> Stuart Halloway wrote:
>> Whatever we do let's make sure we think about how to make it available in
>> all Clojure dialects.
> 
> Yes. When it comes to adding stuff to clojure.string, I'd like to focus
> less on adding single-purpose functions like dasherize and more on
> making sure that it's possible to *write* functions like dasherize in
> a platform-neutral way, that is, not relying on interop or particular
> features of the host platform (such as regex implementations).
> 
> -S

It seems to me that regexes are one of the single most useful tools in writing 
functions like dasherize.

Are you concerned that there are differences in regex implementations between 
host platforms?  Functions like dasherize don't seem to need anything terribly 
fancy from the regex implementation, e.g. recognizing substrings that start 
with capital letters followed by 0 or more lower-case letters.  Such support 
already exists in Java, JavaScript, Python, etc. regex implementations, I think 
with the same regex syntax.

Or are you hoping that someone develops a portable-between-Clojure-hosts regex 
implementation and adds that to clojure.string?  That seems like a fairly big 
chunk of code, even if you implement "only" what Java regexes have, and avoid 
making it better in its Unicode support.  It also adds yet another slightly 
different regex implementation to the world.

Thanks,
Andy

-- 
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

Reply via email to