I'm afraid I have nothing to contribute to the on-going discussions of
what the default numerical behavior should be and what the prime
version operations should do. I did, however, notice that the prime
ops tend to be clustered together in the examples given and seem
likely to be clustered in real usage. It seems that a macro (perhaps
named ops'?) could lexically change the set of core ops
(+,-,*,/,inc,dec,range,etc.) to their prime versions in the given
form. A very weak example just to make usage clear is shown here:

    http://gist.github.com/450037

In larger and more complex examples this might make the code more
readable but it also gives the advantage that one can easily test
whole blocks of code, switching back and forth between the prime and
non-prime versions.

Being a macro this would only convert lexically visible operators and
wouldn't affect any operators contained in downstream macros or
functions. It would probably be good to allow users to provide a list
of custom macros and functions which should be toggled to their prime
version.

-Aaron

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