[Development] Proposal to change connectSlotsByName behavior

Thiago Macieira thiago.macieira at intel.com
Fri Dec 4 09:33:03 CET 2015


On Friday 04 December 2015 08:16:43 André Somers wrote:
> >But I'd expect that the flattening of the tree produces depth-first.
> >Breadth-
> >first could result in a violation of the principle of least surprise.
> 
> Why? That is not my expectation at all. If you ask somebody if he has a
> child named Maria, is he most likely to first name his second daughter
> or the granddaughter by his first child you think?

I agree and disagree. The listing people may use in their heads may look like 
breadth first, but it's actually more chaotic. If you asked someone to name all 
the descendants of a grandparent, they will probably group siblings, and the 
groups may be sorted by generation, but within each generation the groups may 
be out of order.

							Nana
	Alice			Bob			Charlie			Dave
Elsa, Frank	Gerald, Hector, Isabel	 Joey,Kevin 		Lisa

If you ask for someone to list that, it may come out as "Alice, Bob, Dave, 
Charlie, Gerald, Hector, Isabel, Lisa, Elsa, Frank, Kevin, Joey"

However, when talking about computer programming, I'd wager that people expect 
depth-first, if not for the simple reason that this is how they'd implement it 
if they were asked to.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list