ArrayFactory SAM type / toArray

Andrey Breslav andrey.breslav at jetbrains.com
Sun Oct 7 17:29:50 PDT 2012


> That presumes you know the size of the result, or are willing to tolerate truncation/underflow.  There are cases where the stream knows the size but the client does not, and in those cases, treating array as a destination leaves the user with no way to get an array without extra copying.
Fair point, but is creating an array from a stream SO critical that a O(N) time/space is so much of a penalty here?

--
Andrey Breslav
http://jetbrains.com
Develop with pleasure!




More information about the lambda-libs-spec-experts mailing list