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

Laeeth Isharc via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jan 10 12:06:16 PST 2015


> Small recommendation (apart from the reserved word issue which 
> you fixed): it's generally considered good D style to give 
> structs and classes names that start with capital letters, 
> JustLikeThis.  So, I suggest Node rather than node.
>
> Very minor point, and of course, your code is yours to style as 
> you wish, but it can be helpful to meet the "standard" style 
> conventions in order to make it as easy as possible for 
> everyone else to understand.


Thanks for the reminder.  I use D Style when I am writing 
properly, but haven't yet internalized it for a quick example and 
old habits die hard.


More information about the Digitalmars-d-learn mailing list