Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#437 closed enhancement (fixed)

Remove ancestor()/ancestors() in favor of parent()/parents()

Reported by: joern Owned by:
Priority: minor Milestone: 1.1a
Component: core Version: 1.1a
Keywords: Cc:
Blocked by: Blocking:

Description

I don't think we need two ways to do exactly the same thing, and so far parent/parents is far more "popular".

Change History (9)

comment:1 Changed 14 years ago by laurenty@…

I agree, it is actually confusing to have both. I am still not sure if parents() is an alias of ancestors() or not. The documentation for parents() shows ancestors() in its example.

comment:2 Changed 14 years ago by Dave

I prefer parents so this sounds good to me.

comment:3 Changed 14 years ago by glen@…

I agree. I am not sure why there are multiple ways of calling the exact same thing. Parents is better. Ancestors makes me think of mothballs and wagon trains.

comment:4 Changed 14 years ago by blair

Another vote for just parents.

comment:5 Changed 14 years ago by andrea ercol

this is easy: get rid of it

comment:6 Changed 14 years ago by paul.bakaus@…

parents() only.

comment:7 Changed 14 years ago by alan@…

I agree that the duplication is pointless and confusing.

The word 'parent' sounds to me more like just the next node up the tree, whereas 'ancestor' is anything above (although I see my dictionary says that 'parent' can mean 'ancestor' too). Also 'parent' can return one or more parents as we are working on a node set, so the pluralisation is confusing here.

Starting from scratch, I would go for either 'parent' and 'ancestor' or 'parents' and 'ancestors', but both are non-starters from where we are.

'parent' and 'ancestors' makes some sense, and that is what I've used in the past, but the pluralisation is a bit dubious.

So, by a roundabout route, I agree that 'parent' and 'parents' seems the best resolution.

comment:8 Changed 14 years ago by Alex Cook

parent()/parents() makes more sense to me, drop the other.

comment:9 Changed 14 years ago by john

Milestone: 1.1
Resolution: fixed
Status: newclosed

Done, in SVN rev 777.

Note: See TracTickets for help on using tickets.