On May 26, 8:16 am, Stuart Halloway <stuart.hallo...@gmail.com> wrote:
> If you are a user of clojure.contrib.string, please take a look at the  
> proposed promotion to clojure [1]. Feedback welcome! It is my hope  
> that this promotion has enough "batteries included" that many libs can  
> end their dependency on contrib for string functions.

Great to see these bumped into core.  But are we now going to have
clojure.string, and clojure.contrib.string, with half the string
functions in one and half in the other?  It's going to be confusing to
remember which namespace has which functions (since I often use
functions you aren't promoting here), and now I potentially have to
depend on two libs instead of just one.

split-lines (for example) is something I use constantly.  It's also
something just annoying/error-prone enough that I don't want to write
(split #"\r?\n" s) over and over.  I always trip over core's line-seq
because it takes a reader instead of a string as I'd expect.  It'd be
nice to see that one promoted, if split is being promoted too.

What's the point of promoting upper-case and lower-case?  I thought
Clojure generally avoided thin wrappers around Java methods.  I always
use the Java methods directly, personally.  The comments say it's for
mapping over a list of strings, but (map #(.toUpperCase %) xs) isn't
that much typing.  The only use I see for making these a Clojure
function is to improve error-handling.  (upper-case nil) gives an
unhelpful NPE.

--Brian

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