Wondering if this behavior change is considered a bug, undesired, or irrelevant:
Clojure 1.11.1
user=> (drop 1.5 [1 2 3])
(3)
user=> (drop 1.5 (seq "abc"))
(\c)
vs.
Clojure 1.12.0-alpha1
user=> (drop 1.5 [1 2 3])
(2 3)
user=> (drop 1.5 (seq "abc"))
(\b \c)@mfikes There is a precedent in https://github.com/borkdude/speculative/commit/2460379417c0ac6d49327fef54a40a597ed0dcfd where we relaxed int to number for range
Can't find any discussion other than this: https://clojurians.slack.com/archives/CDJGJ3QVA/p1540381365000100
That seems to be a different discussion. Range supports all number types.
What's the use case for non-int in range again?
Ranges of non ints?
oh duh, yes, that's kind of obvious
Range makes a series of numbers from start number to end number, stepping by numbers
I would consider non integers to be undefined behavior
It would also seem that if you tried to define the behavior you might go down an intractable rat hole.
I was messing with porting this (`IDrop`) to ClojureScript and that WIP implementation definitely exhibits undefined behavior.
cljs.user=> (drop 1.5 (seq "abc"))
(nil nil)
There have been cases in the past where these sorts of things have been pushed to have ClojureScript match Clojure, where reasonable, perf-wise.Cool. I won't report a bug against 1.12.0-alpha1.