Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[handly-dev] Consider using Iterable or List instead of arrays in API method return types

Greetings handly-dev,
 
As part of the API work in the 0.4 release, I'm trying to consider whether we should use Iterable or List instead of arrays in API method return types. I'm using Bugzilla for keeping the notes (https://bugs.eclipse.org/bugs/show_bug.cgi?id=472914). Please feel free to leave your comments on the bugzilla.
 
To sum up, my current thinking is that we should keep array-oriented view and consider providing stream-oriented view when we adopt Java 8. The unfortunate problem with streams, though, is that they don't mix well with checked exceptions. It is especially bad because the checked CoreException is omnipresent in Eclipse Platform and Handly APIs. This general problem with streams and checked exceptions calls for a general solution, so I don't (yet) think we can and should address it separately in Handly. Something along the lines of ThrowingStream might be a solution (https://github.com/JeffreyFalgout/ThrowingStream).
 
Best regards,
Vladimir

Back to the top