On Tue, Dec 14, 2010 at 10:57 PM, Brian Goslinga
<quickbasicg...@gmail.com> wrote:
> On Dec 14, 9:24 pm, Ken Wesson <kwess...@gmail.com> wrote:
>> Breaking source compatibility with just about every single preexisting
>> line of Clojure code out there is supposed to make our lives *easier*?
> Actually, it appears that the majority of the lines of code out there
> use integers that fit inside a long, so the change doesn't affect
> them.

You could as well argue that dosync be changed to simply lock all the
things that are altered or assured instead of doing the whole STM
thing. Most things wouldn't break ... but a few things would, with the
odd deadlock here and there. And that too would simplify the
implementation. A lot.

> There exists a difference in the behavior of primitive and reference
> type math in 1.2; Clojure 1.3 will unify the behavior of the two. The
> auto promoting operators need to return an Object currently even if
> they take in primitives because the operation might overflow.  This
> means that the auto promoting operators are incompatible with fast
> math (blame the JVM).

But we have the unchecked-foo operators for when we need fast math. We
have the longer, more awkward name in the rare case and plain old +,
-, etc. in the common case. Now you're proposing to reverse that.

Worse, from the sounds of it the new + isn't exactly the old
unchecked-+; it still checks for overflow rather than allowing
wrapping. That's going to add a compare-and-branch to every add
instruction and halve the speed of those operators on typical
hardware. Compare-and-throw-exception is hardly superior to
compare-and-box-in-BigInteger, since it's still slow AND now some
arithmetic code that used to work but be slow will now explode in your
face.

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