4 ms·
How is OOM not a concern in case of C++, python? Java’s List is much more ergonomic that arrays. Also, I really don’t understand your last example - that’s lit
by kaba0 3y ago
How is OOM not a concern in case of C++, python?
Java’s List is much more ergonomic that arrays.
Also, I really don’t understand your last example - that’s literally available in java returning a List of lines. If you add a .stream().collect(joining(“\n”)), you get the whole string in one go.
- riku_iki 3y ago> How is OOM not a concern in case of C++, python? I think in python it will lazely iterate through the file, and not load everything at once > Java’s List is much more ergonomic that arrays. right, but commenter above proposed array.. > that’s literally available in java returning a List of lines. current API has two issues: - OOM if file is large - it takes Path instance which you need to construct and not "String file" parameter, thus hit on ergonomics