-
Notifications
You must be signed in to change notification settings - Fork 15
How about Set.prototype.pop() or Set.prototype.last? #55
Comments
What's the use case? Sets have insertion order, but beyond being deterministic, the ordering isn't usually relevant in code i've seen. |
That's asking how to do it; it doesn't contain a use case that I can see. Can you be more specific? |
To implement Stack (Last In First Out) behaviour |
If you're wrapping a Set, then you could wrap the |
Yes, but why bother to wrap it. The only method we need to manage stacks with sets is |
Sets aren't a stack tho, they're a set. Arrays are stacklike as well; is there a reason a Set is needed when an Array already has that semantic? |
|
Current proposal contains methods based on set theory, so it's rather an issue for https://github.com/tc39/proposal-collection-methods. Also, I agree with @ljharb argumentation. |
@doasync sure but that's not a property of stacks, it's a property of sets. |
Yeah, ok, thanks |
They already have an issue about |
No description provided.
The text was updated successfully, but these errors were encountered: