Containers

Per Nordlöw per.nordlow at gmail.com
Tue Aug 31 21:36:25 UTC 2021


On Tuesday, 31 August 2021 at 17:21:02 UTC, deadalnix wrote:
> I want to start working on a container library. Interestingly 
> enough, I don't think we have what we need on that front.

Good initiative. I'd be happy to assist.

I have a bunch of value-type containers (struct + dup) lying 
around 
[here](https://github.com/nordlow/phobos-next/tree/master/src/nxt) being `@safe pure nothrow @nogc` whenever possible. It supports significantly more members than emsi-containers at least. It also tries to be dip-1000 compliant but there are like bugs lurking here and there.

[Here](https://github.com/nordlow/phobos-next#containers)'s a 
likely incomplete list of the containers.

Feel free to give me a ping if you need any guidance.

You might find `nxt.trie` of special interest. Beware of its 
size, though.

There's also a benchmark at

     benchmarks/containers

you can try out via either

     benchmarks/containers/test-dmd-debug

or

     benchmarks/containers/test-ldc-release

. It benchmarks a subset of the containers together with D arrays 
and AAs.

Somewhat related, I've also experimented with a run-time variant 
of Rust's ownership and borrowing rules at 
[borrown.d](https://github.com/nordlow/phobos-next/blob/master/src/nxt/borrown.d).

Until later,
Per


More information about the Digitalmars-d mailing list