On Monday, 11 June 2012 at 00:16:48 UTC, Jonathan M Davis wrote:

auto found = find(arr, [1, 2]);

wouldn't compile, because [1, 2] would be considered a static array, which
isn't a range.

- Jonathan M Davis

Uh... that's pretty much just saying, "code that explicitly depends on the current behavior would now break".


Which is true, except that IMHO it's the code's fault.


The problem is there right now /anyway/:
int[2] items = [1, 2];
int[] arr = ...;
find(arr, items);   // "broken"... but, really, it _should_ work


So if that's a problem, then it's obviously a problem with find() -- it should slice the input -- not with this proposal.


Any other examples?

Reply via email to