You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 10, 2024. It is now read-only.
.get(-1) and .set(-1, value) have gotten a lot of support in #5, but since it's a separate proposal (and hasn't gotten a response from @keithamus yet), I figure it probably deserves its own issue.
Summary of reasons to favor it:
they allow access to arbitrary distances from the end, not just the last value
they're consistent with Map
they don't use getters/setters, which are a bit too magical for my tastes (setters especially – setting a property shouldn't have any side effect other than setting that property)
they can be polyfilled in ES3 engines
@rauschmamentioned "I remember there were arguments against those methods, but forgot what they were", but I've yet to find any arguments against this idea.
Looking at the comments in #5, I count 17 people in support (3 comments and 14 other thumbs-ups) and no opposition.