While working on adding test to https://github.com/jank-lang/clojure-test-suite , I found out that several clojurescript functions will hang if it receives infinite (range) as negative case. e.g.
• (even? (range))
• (transient (range))
• (assoc (range) :a 1)
I believe this is the same as this Ask here:https://ask.clojure.org/index.php/14578/even-range-hangs?show=14578#q14578
where the error message tries to realize the argument and causing the hang. (checked the cljs source for https://github.com/clojure/clojurescript/blob/r1.12.134/src/main/cljs/cljs/core.cljs#L4444 and https://github.com/clojure/clojurescript/blob/r1.12.134/src/main/cljs/cljs/core.cljs#L353 and I think the cause is the same)
But the above Ask is for clojure. Would clojurescript also require an ask or voting above sufficient? (or rather, is this already known?)
I think if it were accepted as a change to Clojure then ClojureScript would follow suit. Especially if it can be done without taxing legitimate calls to the affected functions.
I see, I guess voting that ask would be sufficient for now. However, I wasn't being clear enough on one thing. Some of the infinite range error only happen in clojurescript (the above transient and assoc call doesnt throw in clojure jvm). Would this difference be treated as separate?
"Ask"!
asked here, link for posterity https://ask.clojure.org/index.php/15026/missing-protocol-error-infinite-range-clojurescript-clojure