Re: Usability of GSequence API



On Sat, 2007-02-17 at 02:52 +0100, Soeren Sandmann wrote:
> Behdad Esfahbod <behdad behdad org> writes:

> >   - Some methods names hardly suggest the semantics of the operation.
> > For example:
> > 
> > void           g_sequence_move               (GSequenceIter            *src,
> >                                               GSequenceIter            *dest);
> > 
> > What does it mean to move a iterator to another one?  It's still not
> > clear even if you s/GSequenceIter/GSequenceNode/.

> It moves the item pointed to by src to the position given by dest. I'd
> agree that it's unclear that 'src' and 'dest' are not really equals
> here, but I don't see any good alternative names.

How about g_sequence_move_before? The only case where that would come
out imperfect would be when moving something to the end iter. But even
then, you're inserting before the end-of-list, obviously - the end iter
will be pushed down.

-- 
Hans Petter




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]