Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTracking issue for Option::filter (feature `option_filter`) #45860
Comments
dtolnay
added
B-unstable
C-tracking-issue
T-libs
labels
Nov 8, 2017
LukasKalbertodt
referenced this issue
Nov 8, 2017
Closed
Add `Option::filter()` according to RFC 2124 #44996
This comment has been minimized.
This comment has been minimized.
|
@dtolnay Could you add a task "decide on the name ( |
LukasKalbertodt
referenced this issue
Nov 8, 2017
Merged
Add `Option::filter()` according to RFC 2124 #45863
This comment has been minimized.
This comment has been minimized.
|
@LukasKalbertodt @dtolnay Updated. |
This comment has been minimized.
This comment has been minimized.
|
I think I find that the In contrast, |
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Nov 10, 2017
niklasf
added a commit
to niklasf/rust-chessground
that referenced
this issue
Nov 13, 2017
This comment has been minimized.
This comment has been minimized.
|
As I mentioned in #45863 (comment), I have a question regarding the signature of this method: Wouldn't this method be more flexible if the My suggested change would differ from I understand that this method is essentially shorthand for |
This comment has been minimized.
This comment has been minimized.
|
+1 for
|
This comment has been minimized.
This comment has been minimized.
|
@nvzqz Do you have a specific use case in mind? Yes, the method would be more flexible with So without good use case in mind, I would keep the signature as is: I don't think anyone would expect a predicate of a method called |
This comment has been minimized.
This comment has been minimized.
|
About the name: please note that the RFC thread already contains quite a few arguments for and against certain names. I'll try to summarize the most important points here: The two competing names are
Comparing the two:
How this method is called in other languages: |
This comment has been minimized.
This comment has been minimized.
KodrAus
commented
Feb 26, 2018
|
It looks like we're still in the bikeshedding phase here, so just leaving a note to say I found my way here after typing |
This comment has been minimized.
This comment has been minimized.
bb010g
commented
Feb 28, 2018
•
|
@LukasKalbertodt |
This comment has been minimized.
This comment has been minimized.
|
@bb010g Good point. However, I think I still tend to keep the closure as it is right now. A few reasons:
However, I'm not quite sure and don't have a very strong opinion on this decision. |
This comment has been minimized.
This comment has been minimized.
bb010g
commented
Feb 28, 2018
|
You'd probably want |
This comment has been minimized.
This comment has been minimized.
|
So I guess we keep this issue just for Then there's only the naming issue left. Here again, I don't have a strong opinion. I like both names a lot and would be happy either way. |
This comment has been minimized.
This comment has been minimized.
|
There are not very many There are a bunch of |
This comment has been minimized.
This comment has been minimized.
As it seems unlikely that more time will produce new arguments either way, I’d like to propose stabilizing this feature as it currently is in Nightly. @rfcbot fcp merge |
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Mar 17, 2018
•
|
Team member @SimonSapin has proposed to merge this. The next step is review by the rest of the tagged teams: No concerns currently listed. Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
rfcbot
added
proposed-final-comment-period
final-comment-period
and removed
proposed-final-comment-period
labels
Mar 17, 2018
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Mar 19, 2018
|
|
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Mar 29, 2018
|
The final comment period is now complete. |
dtolnay commentedNov 8, 2017
•
edited
This is a tracking issue for
Option::filter.Unresolved questions:
filtervsand_ifvs …)