SpanMode.breadth -- misnomer?

Stewart Gordon smjg_1998 at yahoo.com
Fri Mar 18 17:07:50 PDT 2011


On 12/03/2011 09:31, spir wrote:
<snip>
> You are right about depth / breadth.
>
> (But I also have always found preorder/postorder misleading, or rather inversed. For me,
> the second one should be called postorder, since it postpones app on A after app on A's
> subnodes.

I agree.  Basically:
- Preorder means the processing of each node on entry to its subtree (before visiting the 
children)
- Postorder means the processing of each node on exit from its subtree (after visiting the 
children)

> A better, non-misleading, naming may be branch-first (case 1 above) vs
> children-first (case 2).)

"Branch-first" to me is equally misleading.  How about trunk-first and leaves-first?

Stewart.


More information about the Digitalmars-d mailing list