Fork me on GitHub
#clojure-dev
<
2024-02-15
>
Noah Bogart13:02:35

How does the core team balance defining “undefined behavior” (such as 1.11 map destructuring accepting a seq of a single map) with backwards compatibility and stability guarantees? Do y’all ever worry about repercussions from leaving behavior undefined (and then the unintended behavior gains widespread adoption), by forcing your hand to conform to existing behavior (even when unintentional)?

Alex Miller (Clojure team)13:02:36

What is undefined in this case?

Alex Miller (Clojure team)13:02:50

In this case we took something that was an error and made it do something useful. Generally we consider that to be an additive change and we do that all the time.

👍 1
Alex Miller (Clojure team)13:02:45

Taking something that is undefined and making it defined as something new is another place to play but you have to worry about good old Hyrums Law

Noah Bogart13:02:10

I mentioned the destructuring but maybe that one is not correct. As another example, clojure.set functions assume that their inputs are sets, and passing in other types is “undefined” (tho they have specific behavior that people might rely on).

Noah Bogart13:02:24

Does that ever influence your decisions when it comes to defining or not defining behavior?