-
Notifications
You must be signed in to change notification settings - Fork 242
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
Make it clearer which end of the Flow history stack is the top #261
Comments
This also makes using |
zach-klippenstein
added a commit
to zach-klippenstein/flow
that referenced
this issue
Jun 5, 2017
…explicit methods returning Iterables instead. The raw `iterator` methods on `History` do not make it clear you're iterating from the top or bottom of the stack. Introduced new methods `framesFromTop` and `framesFromBottom` to make it very clear. This also lets you use `for each` loops for both forward and backward iteration. Fix for issue square#261.
zach-klippenstein
added a commit
to zach-klippenstein/flow
that referenced
this issue
Jun 5, 2017
…explicit methods returning Iterables instead. The raw `iterator` methods on `History` do not make it clear you're iterating from the top or bottom of the stack. Introduced new methods `framesFromTop` and `framesFromBottom` to make it very clear. This also lets you use `for each` loops for both forward and backward iteration. Fix for issue square#261.
Got the method names wrong, will follow up with another PR. |
zach-klippenstein
pushed a commit
to zach-klippenstein/flow
that referenced
this issue
Jun 27, 2017
…orrect. I added `framesFromTop` and `framesFromBottom` methods in 03d9578, but the names of the methods were backwards. Follow-up for fix for issue square#261.
zach-klippenstein
pushed a commit
to zach-klippenstein/flow
that referenced
this issue
Jun 27, 2017
…orrect. I added `framesFromTop` and `framesFromBottom` methods in 03d9578, but the names of the methods were backwards. Follow-up for fix for issue square#261.
zach-klippenstein
pushed a commit
to zach-klippenstein/flow
that referenced
this issue
Jul 7, 2017
…orrect. I added `framesFromTop` and `framesFromBottom` methods in 03d9578, but the names of the methods were backwards. Follow-up for fix for issue square#261.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's not obvious that we treat the front of the
History
list as the top of the stack. You can always dig into the code to find out, but it should be easier to just read without knowing how Flow works under the hood.I propose deprecating
History#iterator()
(andHistory.Builder
, and#reverseIterator()
) and replace them with something likeIterable<Object> framesTop()
andIterable<Object> History#framesFromBottom()
.The text was updated successfully, but these errors were encountered: