[Issue 13981] std.algorithm: inconsistent handling of static arrays

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Jan 15 02:57:11 PST 2015


https://issues.dlang.org/show_bug.cgi?id=13981

Jonathan M Davis <issues.dlang at jmdavisProg.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |issues.dlang at jmdavisProg.co
                   |                            |m

--- Comment #2 from Jonathan M Davis <issues.dlang at jmdavisProg.com> ---
In general, I think that it's a big mistake for anything in std.algorinthm or
any other range-based functions to support static arrays. If you want to pass a
static array to a range-based functions, then you slice it, and you get a
dynamic array, which _is_ a valid range.

So, we either need to look at removing support for static arrays for any
functions in std.algorithm which support them, or we need to explicitly
document the cases where they are supported.

--


More information about the Digitalmars-d-bugs mailing list