-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
RickBarretto
wants to merge
14
commits into
arturo-lang:master
from
RickBarretto:start-choose-migration
Closed
Start choose migration #1646
RickBarretto
wants to merge
14
commits into
arturo-lang:master
from
RickBarretto:start-choose-migration
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I hope this is 100% right!
I changed a lot of examples at once, I hope I didn't break anything... :gezz: |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thatelse
andwhen?
violates the way the stack really works, so this is a valid code: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