Closed rvanasa closed 11 months ago
So the Buffer
class's membership function is called contains
, and I did a quick search and it seems like there is actually no membership function in the base library named has
, despite it being in the design doc.
Maybe it makes sense to call this functions contains
and update the design doc to match that?
I do agree that mem
is the worst option of the bunch.
I would be okay with contains
(that was actually my first suggestion while talking with @matthewhammer about this before knowing about the design doc).
This PR deprecates
TrieSet.mem()
in favor ofTrieSet.has()
for consistency with the base library design document.We could update the design guide if this makes more sense, although I think
has
would be less ambiguous thanmem
, which could be misunderstood as having something to do with "memory" instead of "membership" for developers familiar with wording such as "has" / "contains" / "includes".