Suggestion: Operator `in` for slices

Adam Ruppe destructionator at
Sat Dec 18 18:47:33 UTC 2021

On Saturday, 18 December 2021 at 18:29:56 UTC, Quirin Schroll 
> I guess it has never been implemented because this information 
> (true/false) is so much less than it could be.

Nah, the general rule against it is due to speed/computational 
complexity. The `in` operator on AAs has a speed of O(log n) or 
O(1). `in` on slices would exceed that being O(n).

I'm not sure the speed rule is written or not, but generally `in` 
is supposed to have the same speed requirement as `[n]` which is 

More information about the Digitalmars-d mailing list