Skip to content
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

remove implicit Boolean to Fox conversion #2941

Closed
jstriebel opened this issue Jul 20, 2018 · 3 comments · Fixed by #2989
Closed

remove implicit Boolean to Fox conversion #2941

jstriebel opened this issue Jul 20, 2018 · 3 comments · Fixed by #2989
Assignees
Milestone

Comments

@jstriebel
Copy link
Contributor

Conceptionally false is a valid value that can be checked for. Converting this implicitly to a failed Fox makes some expressions to magical (e.g. resolving assertions via the Fox ?~> statement here.
Let's have a look how often this is used and if it makes sense to remove it / convert it to explicit conversions.

@jstriebel
Copy link
Contributor Author

jstriebel commented Jul 20, 2018

That also leads to that x ?~> … behaves differently on Boolean and Fox[Boolean], where Fox[Boolean] seems to be a legit construct.
(Which is similar to Fox[Option], but this does not seem legit to me, as Fox overrules Option and should therefore be converted instead of wrapped. Wrapping a boolean in a Fox is fine.)
Could & should we actually just forbid Fox[Option] and Fox[Future] by having type bounds on Fox itself? /cc @fm3

@fm3
Copy link
Member

fm3 commented Jul 20, 2018

maybe, but that may create problems with function return types and intermediate values that are then flattened

@jstriebel
Copy link
Contributor Author

one more argument: #2953

@fm3 fm3 changed the title (maybe) remove implicit Boolean to Fox conversion remove implicit Boolean to Fox conversion Jul 24, 2018
@fm3 fm3 self-assigned this Jul 31, 2018
@fm3 fm3 closed this as completed in #2989 Aug 2, 2018
@philippotto philippotto added this to the Sprint 25b milestone Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants