-
Notifications
You must be signed in to change notification settings - Fork 16
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
Optional traversal #28
Comments
A |
Or you could (though I definitely don't recommend this) define the type of a forcing lens for Optionals. Maybe call it |
I'd expect a Is Optional unimplemented due to Swift language shortcomings, or just because no one has gotten around to it yet? |
Little of one, little of the other. A lot of the reason we haven't implemented things is because it's just not worth it yet. A lot of the power of the Lens library is things generalize in a thousand little ways where in Swift you're lucky to get one. |
Do you foresee any of the planned improvements in Swift 3 making the implementation more worthwhile? |
Nope. Needs HKTs, which also necessitates a huge number of proposals that would fundamentally alter the language. |
Is there no way to lens through an optional? I've tried with
Party.lpartyCaterer() • User.userName
andParty.lpartyCaterer() • _Some • User.userName
, to no avail.The text was updated successfully, but these errors were encountered: