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

Start choose migration #1646

Closed

Conversation

RickBarretto
Copy link
Collaborator

Description

This PR is not meant to be an implementation of the choose function itself, and this does not remove the target functions that will be deprecated soon.

Basically, the way if?, else, case, when? works is very problematic. Since they depends on each other, and should be independent. Other problem is the fact that else and when? violates the way the stack really works, so this is a valid code:

false
else -> print "Whut??"
; Whut??

And as we may know, this can lead to hidden bugs in a lot of code. That is the reason why me and @drkameleon were avoiding for a long time to use those functions.

So, this is time to change. But first things, first.
We need tests first, to check if the behavior is what we desire, then we need to implement that function and then we need to optimize it.

Worth to say, that choose will replace all of them into once.

Type of change

  • Code cleanup
  • Unit tests (added or updated unit-tests)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (implementation update, or general performance enhancements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (documentation-related additions)

@github-actions github-actions bot added documentation Improvements or additions to documentation rosetta code Issues and PRs related to Rosetta Code snippets labels May 25, 2024
@RickBarretto RickBarretto requested a review from drkameleon May 25, 2024 22:08
@RickBarretto
Copy link
Collaborator Author

I changed a lot of examples at once, I hope I didn't break anything... :gezz:

@RickBarretto
Copy link
Collaborator Author

Ok, cancelling this PR...
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation rosetta code Issues and PRs related to Rosetta Code snippets
Projects
Development

Successfully merging this pull request may close these issues.

1 participant