Why not make 'in' work for arrays (and strings also)?

```
int[string] phonebook;
if ("John" in phonebook) // works

int[] numbers;
if (3 in numbers) // doesn't work, compiler recommends std.algorithm.find

string buildLog;
if ("build error" in buildLog) // doesn't work, compiler recommends std.algorithm.find
```

Good thing that compiler recommends what to use instead, but why not just make it work for any container?

Reply via email to