[Issue 11082] std.algorithm.join of a dynamic array of fixed-size arrays

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 21 10:48:36 PDT 2013


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


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmx.com


--- Comment #4 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-09-21 10:48:34 PDT ---
We're just asking for trouble if we try and treat containers as ranges. We have
enough trouble with dynamic arrays, and they're only pseudo-containers.

static arrays are _not_ ranges, should not be treated as such, and _cannot_ be
treated as such. You'd have to special case algorithms to handle them, because
they violate the range API by their very nature. And it's trivial enough to
slice static arrays - even when they're inside a dynamic array - that I really
don't think that it's worth complicating things with special cases for static
arrays. I think that it's bad enough that static arrays are implicitly sliced
when passed to a function which takes a dynamic array, as that's inherently
unsafe. What you're asking for just makes that problem worse.

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