We work on a fairly large clojure codebase and we have encountered this problem quite a lot.
Just a disclaimer, our design has been a "everything is a map", so it has bit us for quite some time and having a solution like below can be debatable
So we have :keys, :strs for destructuring a map
(def my-func [{:keys [a b c] :as z}])
The problem is that, for the caller, it is very hard to know what all the function end up using from the z map (one can always get
something more than what's destructured. Worse, my-func ends up passing around z elsewhere and it gets hard to refactor code without going through every place where the z has gone
Instead having the following (naming not important for now)
(def my-func [{:keys-only [a b c] :as z}])
which only extracts a b c from the map and the z contains only a b c keys means the function has a strong contract as to what's required by this function. No more refactoring challenges