# std: add a Deque data structure · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/3e77317261e3da50ac55be0c14bc00192ee93166)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 3e77317261e3da50ac55be0c14bc00192ee93166

Requested commit: 3e77317261e3da50ac55be0c14bc00192ee93166

Commit: 3e77317261e3da50ac55be0c14bc00192ee93166

Tree: c653fb7267fbf4c31a707fe6589ebd9c8902df32

Author: Isaac Freund

Committer: Isaac Freund

## Message

```
std: add a Deque data structure

This is my penance for baiting andrew into deleting the existing generic
queue data structures with my talk of "too many ring buffers".

The new Reader and Writer interfaces are excellent ring buffers for many
use cases, but a generic queue container type is now missing.

This new double-ended queue, known more succinctly as a deque, is
implemented from scratch based on the API design lessons learned from
ArrayList over the years.

The API is not yet as featureful as ArrayList, but the core
functionality is in place and I will be using this in my personal
projects shortly. I think it makes sense to add further functions as
needed based on real-world use-cases.

```

## Parents

- [47a2f2ddae9cc47ff6df7a71060bbb3f5f20f2e8](https://git.cafe/gitcafe/zig/commit/47a2f2ddae9cc47ff6df7a71060bbb3f5f20f2e8?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/3e77317261e3da50ac55be0c14bc00192ee93166?format=markdown)
