#16107: Meta ticket: unified sequence/lazy list objects
--------------------------------------------+------------------------
       Reporter:  rws                       |        Owner:
           Type:  enhancement               |       Status:  new
       Priority:  major                     |    Milestone:  sage-6.4
      Component:  combinatorics             |   Resolution:
       Keywords:  days57,                   |    Merged in:
  LazyPowerSeries                           |    Reviewers:
        Authors:                            |  Work issues:
Report Upstream:  N/A                       |       Commit:
         Branch:                            |     Stopgaps:
   Dependencies:  #15852, #15673, #16137    |
--------------------------------------------+------------------------

Comment (by dkrenn):

 I am thinking about implementing !InfiniteSequences and have the following
 design issue with the two possibilites (it is not restricted to the
 infinite sequences, but is similar for other classes like words, stream in
 the species, etc., as well):

 1. make `lazy_list_generic` a base class of `InfiniteSequence`

 2. make an attribute `values` (or similar) in the class `InfiniteSequence`
 which will be an instance of `lazy_list_generic`

 Both have advantages and disadvantages:

 - `Sequence` uses list as a base class, thus `InfiniteSequence` should use
 `lazy_list`
 - With 1. you can only use `lazy_list_generic`, but no derived class like
 `lazy_list_iterator` directly; you have to create a `lazy_list_generic`
 which tracks the other (as its `master` attribute; is already implemented
 since used with slices)
 - With 2. you need to write methods for all the things you like from the
 lazy lists (like building slices etc.). And even then, it is not a lazy
 list, but just behaves like one.

 What do you think?

--
Ticket URL: <http://trac.sagemath.org/ticket/16107#comment:16>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to