For Chuck Allison: possible homework in D

Philippe Sigaud via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 9 03:01:15 PDT 2014


> struct / class Element(T) {
>   T name;
>   T[T] attributes;
>   // ...
>   string toString() {
>     return ...;
>   }
> }

Why did you chose the same type for keys and values? And shouldn't
'name' always be a string?


More information about the Digitalmars-d mailing list