Ilya Zakharevich on Tue, 16 Jan 2024 05:53:30 +0100


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

Re: Bizarre semantic of vecsearch/setsearch


On Mon, Jan 15, 2024 at 08:22:07PM -0800, Ilya Zakharevich wrote:
> contexts I have in mind¹⁾, what seems more reasonable are
> 
>   • Return the largest index with the value < argument.
>   • Return the largest index with the value ≤ argument.
>   • As above, but mark the case when the value = argument.

Hmm, it may be a bit confusing, since one of the current semantics is
close to

  □ The SMALLEST index with the value > argument

So, to clarify: using “the largest” above was just “an accident”!  I
do not suggest “changing LARGEST to SMALLEST”; what I propose is
allowing different semantics of “what happens on EQUALITY”.

Sorry for confusion,
Ilya