Skip to content

Commit 16169a8

Browse files
committed
Add some rationale about clojure.math
That was borrowed from Clojure 1.11's release notes.
1 parent 7896cb9 commit 16169a8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2154,6 +2154,13 @@ Prefer math functions from `clojure.math` over (Java) interop or rolling your ow
21542154
(Math/pow 2 5)
21552155
----
21562156

2157+
The JDK package `java.lang.Math` provides access to many useful math
2158+
functions. Prior to version 1.11, Clojure relied on using these via interop, but this had
2159+
issues with discoverability, primitive performance, higher order application,
2160+
and portability. The new `clojure.math` namespace provides wrapper functions for
2161+
the methods available in `java.lang.Math` for `long` and `double` overloads with fast
2162+
primitive invocation.
2163+
21572164
== Strings
21582165

21592166
=== Prefer `clojure.string` Functions Over Interop [[prefer-clojure-string-over-interop]]

0 commit comments

Comments
 (0)