On Thu, Jun 02, 2022 at 11:07:06PM +0200, Ralf Hemmecke wrote:
> I've just updated my branch
> 
> https://github.com/hemmecke/fricas/commits/elt-universalsegment
> 
> to be in line with the "intersection of indices" see testcases for detail.

I do not think that in eager case returning empty (or shorter
aggregate) is good idea.  Namely for streams normal if we have
empty stream and need an element, then we get error.  OTOH in
eager case we depend on correct length and shortened aggregate
will lead to propagating wrong value.

To put it differenly, for vectors there are two consistent
views, namely curremnt one and alternative view that
vectors are in fact infinite but have only finite number
of nonzero components.  The second view would give 0 for
out of bound references.  While logically consistent, the
second view pragmatically seem to be inferior to current
one.  OTOH when we have stream of coefficients of series,
then empty stream mean that further coefficients are
zero.  So at pragmatic level stream case and eager case
(lists and vectors) are different.

Our current code in eager case signals error early and
this does not cause trouble.  As I wrote, signaling
errors early for stream could lead to trouble (for
example, testing for empty before need would break
stream usage if done for all operations).

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/20220604022643.GA14633%40fricas.math.uni.wroc.pl.

Reply via email to