Remix.run Logo
▲ devin 2 hours ago

I'm kind of iffy on `(get "abc" 1.9)`. I feel like Clojure has always kind of went out of its way to not go to Ruby levels of implicit dynamism. Think things like: "5" * 3 => "555". Explicit > implicit has been a guiding principle in Clojure since the beginning. For that reason I think the behavior is... a little surprising, but also tend to agree I would stop short of calling it a "bug" in any meaningful sense of the word. I'm curious to see what the core maintainers decide to do about it, if anything. If I were a betting man I'd guess it will stay this way forever because existing programs may quietly (or not-so-quietly) rely on the current behavior.

Hyrum's law, anyone?

> With a sufficient number of users of an API, it does not matter what you promise in the contract: all observable behaviors of your system will be depended on by somebody.

▲rvprasad 2 hours ago | parent [-]

I believe most significant/critical software (written in Clojure) would not pass a float/double as a key in the context of string object. At the same time, instead of evaluating the impact of such a change, the core team may just lean on Hyrum's law and decide to not change the behavior. It is also possible that the core team may just ignore this list.

So, while I prefer changing get's behavior to match our intuition in the context of string objects, I think it could go either way, which is not saying much :)