On Feb 26, 4:56 pm, Peter Wolf <opus...@gmail.com> wrote:
>
> So my vote is that String are atomic built in objects, and at least +, <
> and > should work with Strings. The behavior should be just like Java,
> so (+ "foo" 2) --> "foo2"
I have an HP calculator. (I may get some of the details wrong here, I
haven't used it lately, but this is the gist of the thing.) + adds
numbers. + also concatenates lists. But wait, UNLESS the lists are
lists of numbers, in which case it adds numbers componentwise. Which
means you have to create a new function or operator if you actually
want to be sure you are concatenating lists. It's just dumb. The point
is, functions should not take on all kinds of extraneous
responsibilities that are completely unrelated to their purpose. +
adds numbers. str concatenates strings.
BTW, I don't know if this concept of "built in object" you keep saying
has any meaning in Clojure. Strings are just objects of the class
String, just like in Java.
--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---