Re:Rich Hickey: extensible data notation
by alexchamberlain on Friday September 07, 2012 @03:36AM
(#4487987)
.5 cannot be a symbol, so it would make sense to add it to the grammar.
[ Parent
| on HN ]
Re:Rich Hickey: extensible data notation
by dsantiago on Friday September 07, 2012 @03:41AM
(#4488003)
Actually, .5 does not parse as a number in Clojure, and does parse as a symbol.
user> .5
CompilerException java.lang.RuntimeException: Unable to resolve symbol: .5 in this context, compiling:(NO_SOURCE_PATH:1)
user> (type '.5)
clojure.lang.Symbol
Re:Rich Hickey: extensible data notation
by alexchamberlain on Friday September 07, 2012 @03:50AM
(#4488031)
Interesting, it's not a symbol according to EDN.
Re:Rich Hickey: extensible data notation
by dsantiago on Friday September 07, 2012 @04:01AM
(#4488056)
Oh yes, there's a few differences. For example, Clojure also has a radix notation for integers (as in 16rFF = 255) that doesn't seem to be a part of EDN. I had assumed that Clojure would cast the deciding vote in these sorts of things, but now that I think about it, maybe not.