Peter Wolf <opus...@gmail.com> writes:

> Is there a good reason that + can't do the right thing as with other 
> Java and scripting languages?  I think this would be popular with 
> non-LISPers.

Putting a type check in + would slow down basic math, and there is a
class of user who will complain loudly if basic math slows
down. However, this also means that > and < also don't work on strings,
which is pretty lousy.

One approach that's been proposed in #clojure is to make these functions
more capable by default, but then provide a fast-math library that could
redefine them in terms of numerics-only. I'm a big fan of functions
doing the most helpful thing by default but being able to offer better
speed when you need it.

Convenience vs speed is always a trade-off, but I think convenience
should win in the default case. What do others think about this?

-Phil

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

Reply via email to