Error formatting macro: pagetree: java.lang.NullPointerException

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Primitives - These are raw JVM primitives, not object references. They are by far the fastest way to do math on the JVM. Although it supports all primitives for the purposes of Java interoperability, for other purposes pure Clojure uses only long and double. Clojure will seamlessly promote ints to longs and floats to doubles as needed. When calling back to Java for interop, conversions to a smaller primitive type are checked for overflow, so no safety is lost.
  • Boxed Numbers - These are full objects that extend the java.lang.Number class. Clojure supports the full set of numeric types built into the JVM: Byte, Short, Integer, Long, BigInteger, Float, Double, and BigDecimal, as well as two additional types provided by Clojure:
    • clojure.lang.Ratio, for expressing rational numbers that cannot be expressed as a terminating decimal without truncation
    • clojure.lang.BigInt, which is similar to Java's java.math.BigInteger in allowing integer sizes exceeding 64 bits, but provides better performance by delegating to native operations when small enough. Also, unlike BigInteger, Clojure's BigInt provides a consistent hash value with Integer and Long, meaning that it can be used interchangeably with them as map keys. Clojure code utilizes BigInt in favor of BigInteger.

...

In contrast to previous versions of Clojure, numeric literals are parsed as primitive longs or doubles. Clojure also provides a new literal syntax for the new BigInt class: append a capital N to the number, e.g, 42N. Integers to long to be primitives are also parsed as BigInts.

...