You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
version: Babashka 0.7.3 with sci 0.2.8 platform: Linux binary
problem:
When a map/set/vector expression has metadata map attached to it, JVM Clojure evaluates value first and metadata map second. In Babashka, the order is the opposite.
The evaluation order of expression and its meta map is inconsistent to the order in Clojure. The Clojure spec is not very specific about it, however, such minor difference may still have effect on portability of Clojure codebase into Babashka.
version: Babashka 0.7.3 with sci 0.2.8
platform: Linux binary
problem:
When a map/set/vector expression has metadata map attached to it, JVM Clojure evaluates value first and metadata map second. In Babashka, the order is the opposite.
The evaluation order of expression and its meta map is inconsistent to the order in Clojure. The Clojure spec is not very specific about it, however, such minor difference may still have effect on portability of Clojure codebase into Babashka.
repro:
expected behavior:
In Clojure 1.10.3, it returns
"123"
.In Babashka, result is
"231"
. 123 would be preferred/expected.solution:
I think it can be addressed for maps by changing evaluation order in
sci/src/sci/impl/evaluator.cljc
Line 90 in 5247b86
(I have not yet found the location for solving it for sets and vectors.) Can I go ahead with a PR of the change?
The text was updated successfully, but these errors were encountered: