On Thursday, 16 January 2014 at 07:28:43 UTC, luka8088 wrote:
On 15.1.2014. 16:30, pplantinga wrote:
In python, I really like the ability to check if an element is in an array:

if x in array:
  # do something

D has this, but only for associative arrays. Is there any chance we
could extend this to every kind of array?

D array uses this operator for checking against array keys, not values.

It makes sense for sorted arrays, as they make good sets.

That said, it makes the most sense to limit opBinaryRight!"in" to SortedRange.

Reply via email to