idiomatic D: what to use instead of pointers in constructing a tree data structure?

Tobias Pankrath via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jan 7 08:17:46 PST 2015


  A slice seems overkill to refer to just one object, but is that
> the best way ?

struct Tree
{
     Tree[] children;
}

Is one way to do it.


More information about the Digitalmars-d-learn mailing list