[SR-8437] Add filter method to Optional #50960
Labels
feature
A feature request or implementation
standard library
Area: Standard library umbrella
swift evolution proposal needed
Flag → feature: A feature that warrants a Swift evolution proposal
Additional Detail from JIRA
md5: 3852b2408d69c13546d326891036b911
Issue Description:
There is a strong precedent from other programming languages that have optional types to include method named
filter
that conditionally maps the optional tonil
. The implementation is trivial:Swift is currently missing this method. When pitched in Swift Evolution Forums, this method was met with no opposition. This looks like a clear omission without any downsides, that should be easy to add into Swift standard library without the need to go through lengthy Swift Evolution process.
The text was updated successfully, but these errors were encountered: