I have a issue that has been languishing for a while in JIRA, that I
would like to see move forward. It is a strange little special case
that exists in the compiler that can be gotten rid of fairly easily.
The url is http://dev.clojure.org/jira/browse/CLJ-873
If a member of clojure/core could look at it, I would appreciate it!
Cheers,
Chris
Can you please provide some deeper rationale for this?
Cheers,
Aaron Bedra
--
Clojure/core
http://clojure.com
> --
> You received this message because you are subscribed to the Google Groups "Clojure Dev" group.
> To post to this group, send email to cloju...@googlegroups.com.
> To unsubscribe from this group, send email to clojure-dev...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/clojure-dev?hl=en.
>
Thanks for having a look. The reason for this is that sometimes you
want to define a function named "/". I wanted to do this because I
wanted to define rational arithmetic in Clojurescript, but it seems
reasonable in other situations as well. If you ever want to use this
function in another namespace with the current reader, you are out of
luck.
The function named "/" is the only function where this is the case. To
me, that seems like a pretty glaring inconsistency in the language. A
simple example:
user=> (ns foo (:use [clojure.core :as c]))
nil
foo=> (c/+ 1 2 3)
6
foo=> (c/* 1 2 3)
6
foo=> (c// 12 2)
12
RuntimeException Invalid token: c// clojure.lang.Util.runtimeException (Util.java:156)
RuntimeException Unmatched delimiter: ) clojure.lang.Util.runtimeException (Util.java:156)
2
foo=>
I concede that there's not a huge need for people to go around defining
their own / functions. However, it does exist, and the behavior above
shows that it does not currently work.
Cheers,
Chris
Cheers,
Aaron Bedra
--
Clojure/core
http://clojure.com