On Mon, Jun 21, 2010 at 1:19 AM, Mark Engelberg <mark.engelb...@gmail.com>wrote:

> The arguments seem to be winding down, so I thought this would be a
> good time to summarize my thoughts.
>

I will do that too.
The two sides of the arguments have both good points and won't change their
position.
So, my proposal:
- a different set of labeled operators +', +#  per family of return value.
(boxed, long, maybe more to come...)
- the default for the non-labeled operators +,-... can be choose either by a
flag or by a ns trickery. ( I have to say I advocate the flag)
- the flag also change the default for literals.
- Default for the the non-labeled operator is boxed. It removes the problem
for loop/recur, and gives back the problems are they are now.
- People that don't know use the default operators
- people that explicitly knows their code has some interesting properties
(always small int,
can produce a big int with very small inputs) specifies it by using
explicitly the specialised operators.

The flag *use-primitive-as-default* is a big help for optimization. Most of
the performance hits of boxing do not show in profiling.
(It slows down a lot of functions, by memory access and - more importantly -
filling the cache with garbage,  that do not seem to be arithmetic-heavy)

The do-not-worry default allows an easy learning curve.

The specialized operators in both directions allows to explicit some
semantic differences in the meaning of the operations. It is good to give a
way to people to
specify, if they want to, what they know about their program.

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