[Issue 5939] Cannot copy std.algorithm.map

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 9 14:47:25 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5939



--- Comment #5 from David Simcha <dsimcha at yahoo.com> 2011-05-09 14:43:24 PDT ---
(In reply to comment #4)
> I'm going to argue this is not a compiler bug.
> 
> The return type from map (call it T) is a private, opaque data type. The only
> way to get an instance of T is by calling map(). T cannot be default
> constructed - hence the error message.

I agree with you in principle, but heavily using types that can't be default
constructed in public APIs is going to subtly break a lot of generic code when
it tries to use such types.  If it's not a compiler bug then it's bad library
design.

-- 
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