Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EdnReader.java is more liberal with numbers than defined here. Which is correct? #47

Closed
bjeanes opened this issue Mar 21, 2013 · 2 comments

Comments

@bjeanes
Copy link

bjeanes commented Mar 21, 2013

The regex at https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/EdnReader.java#L28-L30 allows for octal, hex, and arbitrary base (e.g. 3r2011012) ints.

Is the edn definition incomplete or is the clojure EDN reader too liberal?

@bpsm
Copy link

bpsm commented Jun 17, 2013

EdnReader.java also accepts rationals without complaint, but those go unmentioned in the spec. It looks to me like an accident resulting from the fact that EdnReader.java began as a copy-paste job of LispReader.java.

There's a meta-point here: I don't think it's helpful if every edn reader supports a different superset of the notation described by the spec.

See also bpsm/edn-java#34.

@richhickey
Copy link
Contributor

EDN read is more liberal than the spec. I don't see that as a problem, as the spec is the arbiter, not implementations. The spec is going to start conservatively, but these may be added iff there is demand/need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants