[Issue 5939] Cannot copy std.algorithm.map
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 12 08:44:31 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5939
--- Comment #7 from Andrei Alexandrescu <andrei at metalanguage.com> 2011-07-12 08:39:19 PDT ---
This is one of those things that could go either way. I see merit in
restricting the result of "map" for direct consumption, without allowing
creating an empty result without a corresponding map call.
On the other hand, it's often impossible to do so. Consider the many filtering
functions that take a range and build additional functionality on top of it.
Such functions need to create a range that contains the subject range as a
member. It's reasonable to require that map can be combined with such
functions.
I think it's best to fix this - e.g. by storing a null frame pointer in the
default-constructed object.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list