When talking about Search Functions and Hash Tables, the docs mention "Note that ⍷ (find) does not employ the same hashing technique, and is excluded from this discussion."
What's the salient difference being hinted at here? Naïvely, I'd probably have guessed Find to have similar caching behavior as Iota and friends.
As for principal arguments of search functions, I can convince myself of the logic behind choosing one argument as principal and the other as subject, except for ∩ and ∪.
Since they're logically commutative, does it instead have to do more with typical usage patterns or something?
@B.Wilson While normal lookups have as many possible locations as there are (unique) elements/major cells, Find looks at (multidimensional) contiguous subarrays. E.g. in 3 4⍴⍳12, Find can find 128 distinct subarrays.
@B.Wilson They are defined in terms of ∊ and are not symmetric. a∩b is (a∊b)/a and a∪b is a,(~b∊a)/b.
This is often very useful. If you want them to work as proper set functions, give them sets, or post-process with monadic ∪.
Anyway, as you can see, one of the arguments is the subject being filtered, while the other is the principal (haystack) of ∊.
The way I think of it isn't in terms of principal and subject at all. I see the left argument as being the main argument, which is either filtered using ∩ or extended using ∪. (Should it have been the other way around, with main on the right and "parameter" on the left? Quite possibly.)
This fits with ~ where the main data is on the left and the "parameter" of which values to remove are on the right.
Even fits with , which appends the right argument to the left, rather than prepending the left to the right. (Again, a questionable decision, but at least consistent across ∩∪~,)
Cute. Prototype behavior breaks symmetry. IIRC, though, you previously instructed me that "controlling potential prototypes by prepending an empty array" is unreliable across Dyalog versions and whatnot.
@B.Wilson Sure, but the change from right to left (hence version differences) was intentional, only that apparently, nobody considered the high-rank case.