Odd-entry-count maps would have corner cases: One would need to use an even
number of unary operators.  If an odd number of unary operators were used,
what looked like a valid expression would become a map, and that might be
hard to figure out.

Also, since the order of entries in a map is not guaranteed, the reader
would need to store the map entries in an intermediate form and decide when
it gets to the end whether it becomes a map or a macro call.

There's nothing special about curly braces in terms of being able to read
math - in fact, parentheses make more sense.  So a macro in position one of
a list seems like a much better answer.  Even if you'd like to avoid
spelling out a macro name like "infix", you could make it "i", and this
handles unary operators:

(infix 2 + 4 * - x)

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to