Re: Collections in D

2021-01-13 Thread mw via Digitalmars-d-learn
On Wednesday, 13 January 2021 at 12:06:05 UTC, Roguish wrote: which seems perfectly adequate. What about sets? You can also search https://code.dlang.org I use: https://code.dlang.org/packages/emsi_containers Which has hashset:

Re: Collections in D

2021-01-13 Thread Roguish via Digitalmars-d-learn
On Wednesday, 13 January 2021 at 12:39:50 UTC, evilrat wrote: There is no specific set container, they just implemented as generic algorithms over the ranges. I see. Thanks for pointing that out.

Re: Collections in D

2021-01-13 Thread Roguish via Digitalmars-d-learn
On Wednesday, 13 January 2021 at 12:48:47 UTC, Ferhat Kurtulmuş wrote: I read many posts that rbtree can be a replacement for sets in dlang. see its behaviour is identical. Thanks, will read up.

Re: Collections in D

2021-01-13 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Wednesday, 13 January 2021 at 12:06:05 UTC, Roguish wrote: On Wednesday, 13 January 2021 at 11:58:11 UTC, Roguish wrote: I can't find anything about collections in D. All I have found are arrays and maps ("associative arrays"). What about lists and sets? What if I just want a l

Re: Collections in D

2021-01-13 Thread evilrat via Digitalmars-d-learn
On Wednesday, 13 January 2021 at 12:06:05 UTC, Roguish wrote: What about sets? There is no specific set container, they just implemented as generic algorithms over the ranges. There is a section for set operations (std.algorithm.setops module). https://dlang.org/phobos/std_algorithm.html

Re: Collections in D

2021-01-13 Thread Roguish via Digitalmars-d-learn
On Wednesday, 13 January 2021 at 11:58:11 UTC, Roguish wrote: I can't find anything about collections in D. All I have found are arrays and maps ("associative arrays"). What about lists and sets? What if I just want a linked list? It seems collections are called "containers&q

Re: Collections in D

2021-01-13 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Wednesday, 13 January 2021 at 11:58:11 UTC, Roguish wrote: I can't find anything about collections in D. All I have found are arrays and maps ("associative arrays"). What about lists and sets? What if I just want a linked list? You can refer to the docs for them: https://dlang.

Collections in D

2021-01-13 Thread Roguish via Digitalmars-d-learn
I can't find anything about collections in D. All I have found are arrays and maps ("associative arrays"). What about lists and sets? What if I just want a linked list?