Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Parameter order of Match parameters is inconsistent #683

Open
bash opened this issue Oct 7, 2022 · 2 comments
Open

Parameter order of Match parameters is inconsistent #683

bash opened this issue Oct 7, 2022 · 2 comments
Labels
breaking change These are change in a way that is not API-compatible to discuss There are open points which need to be discussed

Comments

@bash
Copy link
Member

bash commented Oct 7, 2022

Either and Option both have the error state first:

  • Either: Match(left, right)
  • Option: Match(none, some)

The inconsistent one is Result with the error state second:

  • Result: Match(ok, error)
@bash bash added the breaking change These are change in a way that is not API-compatible label Oct 7, 2022
@bash bash changed the title Argument order of Match and Switch is inconsistent between alternative monads Argument order of Match parameters is inconsistent Oct 7, 2022
@bash bash changed the title Argument order of Match parameters is inconsistent Parameter order of Match parameters is inconsistent Oct 7, 2022
@FreeApophis
Copy link
Member

FreeApophis commented Oct 13, 2022

Is this really relevant, for calls to Match the Labels are "undesirable".

@bash bash added the to discuss There are open points which need to be discussed label Oct 13, 2022
@bash
Copy link
Member Author

bash commented Oct 13, 2022

I ran into this when I tried to generalize the Match analyzer (#680) to all Either-like monads in Funcky. I'd have to add a special case for Result anyways until we release 4.0, so this is not that important to me.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
breaking change These are change in a way that is not API-compatible to discuss There are open points which need to be discussed
Projects
None yet
Development

No branches or pull requests

2 participants