Hello Pierre,
I believe there is nothing wrong with a variadic LINSERT, as you noted
backward compatibility is ok and the return value also makes sense in
the new form.
However about the behavior when BEFORE is used, I disagree with your
proposal as IMHO LINSERT is different than a variadic LPOP. "Before"
does not make it equivalent to pushing elements to the left/head, but
I read it as:
Please List-INSERT the following sublist A B C D BEFORE element 5
So if my list is 3 4 5 6 7 8 I expect the result to be:
3 4 A B C D 5 6 7 8
In general I expect LINSERT A B C D to insert the sequence in the same
order regardless of after/before, so the operation should be
semantically coherent, regardless of *where* the insertion point is.
That said, for all the rest, it looks like an ok change to me.
Thanks,
Salvatore
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
redis-db+u...@googlegroups.com.
> To post to this group, send email to
redi...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/redis-db.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>
--
Salvatore 'antirez' Sanfilippo
open source developer - GoPivotal
http://invece.org
Beauty is more important in computing than anywhere else in technology
because software is so complicated. Beauty is the ultimate defence
against complexity.
— David Gelernter