Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Switch shift and pop for reverse iterators #666

Open
nwellnhof opened this Issue · 4 comments

3 participants

Nick Wellnhofer Andrew Whitworth Vasily Chekalkin
Nick Wellnhofer
Collaborator

Currently, you're supposed to use "shift" with normal iterators and "pop" with reverse iterators. I think that doesn't make sense. If I have a function that takes an iterator as argument, how does it know whether to use shift or pop? I think that shift and pop should be switched for reverse iterators.

Originally http://trac.parrot.org/parrot/ticket/1747

Andrew Whitworth
Owner

At this point iterators are used so pervasively with the current syntax that this simple-sounding change would be extremely painful to make. Unless somebody with super-powers wants to step up to tackle this project, I think the best course of action is to close it as WONTFIX. It's a nice idea, but way too much work for too little benefit.

Vasily Chekalkin
Collaborator

-1 for closing it as WONTFIX.

Andrew Whitworth
Owner

oh wait, I think I misunderstood what this ticket was asking for. You don't want to reverse the opcodes used, you want to use shift everywhere and not use pop for reverse iterators? That makes much more sense and would be a much smaller change to make.

Vasily Chekalkin
Collaborator

@Whiteknight yes, now you understand :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.