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

-ROT not in 2012 Standard #61

Closed
Budsy opened this issue Mar 10, 2018 · 4 comments
Closed

-ROT not in 2012 Standard #61

Budsy opened this issue Mar 10, 2018 · 4 comments

Comments

@Budsy
Copy link

Budsy commented Mar 10, 2018

I was puzzled to see that -ROT is not in the 2012 Forth core word list. Ok, I know that ROT ROT would be the equivalent, and 2 ROLL would do the same thing. But, gosh, I have been using -ROT from various Forths for a long time, and use it a lot. If it were part of a standard Forth, it could be optimized in ML, for example. So, arguments for not relying on the inline code:

: -ROT ( n1 n2 n3 -- n3 n2 n1 ) ROT ROT ; \ a pity to have to use this. slower
: -ROT ( n1 n2 n3 -- n3 n2 n1) 2 ROLL ; \ sobbing now... have to push a value on stack, slower

Thoughts?

@pebhidecs
Copy link

pebhidecs commented Mar 10, 2018 via email

@AntonErtl
Copy link

AntonErtl commented Mar 10, 2018 via email

@forthy42
Copy link
Member

forthy42 commented Mar 10, 2018 via email

@Budsy
Copy link
Author

Budsy commented Mar 14, 2018

Yes, I do that sort of thing in my code-- conditionally compiling -- but I might be having to do this all the time for what 'feels' like it should be a standard primitive. Acttually, -ROT is in my system (SwiftForth), so it's more of an academic argument for me at this point.

@Budsy Budsy closed this as completed Mar 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants