# Taking \`push!\` and \`pop!\` seriously

**URL:** https://discourse.julialang.org/t/taking-push-and-pop-seriously/34326
**Category:** Internals & Design
**Tags:** proposal
**Created:** [February 7, 2020, 9:53pm UTC](https://discourse.julialang.org/t/taking-push-and-pop-seriously/34326 "2020-02-07T21:53:27Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [February 9, 2020, 7:56am UTC](https://discourse.julialang.org/t/taking-push-and-pop-seriously/34326/8 "2020-02-09T07:56:56Z")

</div>

Note that `pop!` for `Set` (which is a `Dict`) is not thread safe at the moment, and [it unlikely to ever be](https://discourse.julialang.org/t/can-dicts-be-threadsafe/27172/6). If I wanted to consume an unordered collection by threads, I would just design an appropriate data structure for this (with locks etc).

In any case, I think that this use case (mutation of unordered containers by multiple threads) is a red herring, and just distracts from the main API.

Personally, I would prefer a clean, simple API, with some clear contracts, even if it does not support all possible combinations one can think of — in fact, I would consider _not_ supporting some methods an advantage when it cannot be done in a consistent way.

---

_[View the full topic](https://discourse.julialang.org/t/taking-push-and-pop-seriously/34326)._
