Checking over the documentation for one of the new R17 features, maps, brought me to maps:remove/2 and maps:without/2. The only clear distinction I can see is that remove/2 takes a single key and returns a view of the map without it, where without/2 accepts a list and returns a completely new map lacking the listed keys.
22> M1 = #{foo => bar, spam => eggs}.
#{foo => bar,spam => eggs}
23> M2 = maps:without([foo], M1).
#{spam => eggs}
24> M3 = maps:remove(foo, M1).
#{spam => eggs}
25> M1.
#{foo => bar,spam => eggs}
26> M2.
#{spam => eggs}
27> M3.
#{spam => eggs}
What is the practical impact of this? I can appreciate not wanting to create in-memory copies of gigantic maps with without/2, but why doesn't remove/2 accept a list? I'm assuming there is a performance-oriented reason why these two functions exist the way they do, but I'm confused about when I would want to use one over the other in most situations (meaning, I don't think that maintaining gigantic maps are a generally good idea).