revisiting "shift"

David Herman dherman at
Tue Apr 27 08:02:18 PDT 2010

> Also notice that, unlike JS 1.7 "yield", a function that uses "shift" is not special in that it doesn't immediately suspend its body when you first call it. But because it's a syntactic operator, it's more manageable for implementors of high-performance ES engines, since they can trivially detect whether a function may need to suspend its activation.

Quick clarification-- "more manageable" than if it were a library function instead of a syntax, not more manageable than "yield". (The "yield" form is also an operator, and is manageable for implementors for exactly the same reason.)


More information about the es-discuss mailing list