Bill Allombert on Sun, 01 Mar 2026 12:24:27 +0100


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

Re: vecsum a Vecsmall


On Sun, Mar 01, 2026 at 11:55:33AM +0100, Ruud H.G. van Tol wrote:
> 
> vecsum() doesn't "transparently allow a t_VECSMALL" yet, or a List(),
> where for example vecsearch() and vecsort() do.
> As do vecmin(), vecmax(), but their docs don't mention it explicitly.
> 
> Is vecsum() more limited on purpose?

Not, it is t_VECSMALL which is limited on purpose.
We do not want to allow direct arithmetic operations on t_VECSMALL components,
because they are not well-defined.

On the other hand, comparaison is normally fine.

Cheers,
Bill.