user=> (class 123.) java.lang.Integer
In contrast, Java reads such a number as a double. % javac Foo.java Foo.java:5: possible loss of precision found : double required: int int a = 123.; ^ 1 errorAnother place this comes up is with a number formatted as 123.e4. Currently that's an invalid number in Clojure:
user=> (class 123.e4) java.lang.NumberFormatException: Invalid number: 123.e4 java.lang.Exception: Unmatched delimiter: ) user=> Java reads it as 1230000.0To bring Clojure in line with Java for numbers formatted this way, I propose changing the reader to match Java's behavior for these cases. I have a patch which I'll attach to an issue if one is approved.
--Steve
smime.p7s
Description: S/MIME cryptographic signature