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

All comparison ops should return a word #1

Open
strinsberg opened this issue Sep 13, 2021 · 2 comments
Open

All comparison ops should return a word #1

strinsberg opened this issue Sep 13, 2021 · 2 comments
Labels
breaking change enhancement New feature or request

Comments

@strinsberg
Copy link
Owner

The current behavior for double word ops is to return a double word. This does not make sense because the main op to use these branch takes the top 2 words of the stack.

Change double word ops to return a single word 1 or 0 for true and false.

@strinsberg strinsberg added the enhancement New feature or request label Sep 13, 2021
@strinsberg
Copy link
Owner Author

I have added macros that allow converting a word to double word and double word to word. These make this change not a priority as it will break a lot of tests. Perhaps if it is still seen as necessary it can be done along with the other suggested breaking changes. It also is a little hard to be sure if all boolean functions should return a single word, or if all double word functions should always return a double word. So for now the macro solves the problem and may just be left that way for good measure. Even some macros that create new double word comparison ops could be made that always return a single word.

@strinsberg strinsberg added backburner Things that we want to do, but can wait breaking change labels Sep 16, 2021
@strinsberg strinsberg removed the backburner Things that we want to do, but can wait label Sep 25, 2021
@strinsberg
Copy link
Owner Author

This keeps confusing me when I work with double words. I think it makes more sense to have all operations that do comparisons return a single word for true or false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant