http://d.puremagic.com/issues/show_bug.cgi?id=9582
--- Comment #5 from monarchdo...@gmail.com 2013-02-24 08:21:49 PST --- (In reply to comment #4) > (In reply to comment #3) > > ...and this is good example of why accepting an "iterable" as a function > > argument, as opposed to a range, is usually a bad idea. > > > > As for reduce accepting iterable, Andrei asked me to remove it in one of my > > open requests, so don't expect it keep working for too long. > > > > https://github.com/D-Programming-Language/phobos/pull/861#discussion_r2024457 > > std.array.array also accepts iterables. I think array and reduce are the only > two. > > Removing these is going to break a lot of code though. For array, probably. For reduce, probably much less. I think ideally, we should accept "isNonStaticArrayItterable": The idea of "isIterable" is to accept stuff that is either a range, or has opApply. Static arrays, while being iterable, shouldn't be passed around by value to functions. I think there'd be gains in the long run to such a scheme. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------