-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add safe counterpart methods for collections #127
Comments
I've got some intuitions from @armanbilge (thanks Arman) that:
But at this point, |
I see there is a ticket over there to migrate issues. #12 But I don't know if an issue would receive attention there. I think Safe alternatives are requested, such as for
There are also indexing ops which sometimes throw and sometimes don't. |
Housing for the FP community. It's a very safe neighborhood, of course. |
Hey there. Have a nice day by contributing to Scala!
Perhaps, I'll ask kinda annoying a heavily discussed previously question, but do you mind adding safe counterpart methods for collections?
Say,
scala.collection.Iterable
hashead
method and its safe counterpartheadOption
. So it's seemed natural to add safe counterparts for methodsinit
,tail
, etc.There is demand in the FP community for such methods, like this recent PR to
mouse
library.Doubtless, Scala is great with its mechanisms of creating extension methods. But speaking from the allocations perspective, it'd be much better to have those methods in the collection library straightforwardly.
So, what do you think about adding those methods to the 2.13 (or more likely to 2.14 if we'll have it in a wild) collections library? If this 'issue' is a duplication, feel free to close it.
The text was updated successfully, but these errors were encountered: