RE: F&O comments on insert function

It seems to me that it's best to choose the one that most people would
find intuitive.  In my experience, I generally expect that if you say
you want to insert something at the N position, it becomes the Nth item.
But, of course, my experience could be different from others, or it
could be that it's simply not worth changing at this point.

Thanks,
Priscilla



> -----Original Message-----
> From: Kay, Michael [mailto:Michael.Kay@softwareag.com] 
> Sent: Wednesday, November 20, 2002 2:12 PM
> To: Priscilla Walmsley
> Cc: public-qt-comments@w3.org
> Subject: RE: F&O comments on insert function
> 
> 
> The current specification inserts the new items after the Nth 
> item of the
> existing sequence. You want to insert the new items before 
> the Nth item of
> the existing sequence. It's not clear to me that this is an 
> improvement: the
> choice seems essentially arbitrary.
> 
> Michael Kay
> Software AG
> 
> > -----Original Message-----
> > From: Priscilla Walmsley [mailto:priscilla@walmsley.com] 
> > Sent: 20 November 2002 15:43
> > To: public-qt-comments@w3.org
> > Subject: F&O comments on insert function
> > 
> > 
> > 
> > 
> > 
> > 
> > The description of the insert function says: 
> > 
> > "The value returned by the function consists of all items of 
> > $target whose index is less than or equal to N, followed by 
> > all items of $inserts, followed by the remaining elements of 
> > $target, in that sequence."
> > 
> > So, that would mean that 
> > 
> > insert( (1, 2, 3), 2, ("x", "y")) 
> > 
> > would return
> > 
> > (1, 2, "x", "y", 3)
> > 
> > That doesn't seem intuitive to me; I would expect it to be 
> > inserted one position earlier:
> > 
> > (1, "x", "y", 2, 3)
> > 
> > Should the text say "less than N" instead of "less than or 
> > equal to N", or was that deliberate?
> > 
> > Thanks,
> > Priscilla
> > 
> 

Received on Friday, 22 November 2002 00:33:22 UTC