On Wed, 9 Sep 2009, Andrew Whitworth wrote: > On Wed, Sep 9, 2009 at 9:36 AM, Austin > Hastings<austin_hasti...@yahoo.com> wrote: > > Adding ppsu would make PVM "more complete", but it probably wouldn't change > > the way people are writing PIR - old habits, etc. > > The Fixed*Array types allocate a fixed amount of storage. Adding ppsu > ops to it would require keeping track of not only how much storage we > have allocated (some of which is possibly empty), but also keeping > track of where the current "beginning" and "end" of the array are, so > we can add/remove items from both ends. Also, if we start talking > about the edge cases where we try to push on more objects then there > is space, we either need to throw exceptions or start rotating > objects, or whatever. What we'd end up with is some variant on a > circular buffer, which is much more heavy weight then we really need.
I would think that all depends on how it's actually specified and implemented. For the fixed-size stack model I described, I could easily imagine implementing the push/pop ops with lots of copying of elements, and no changes to any of the other operations on fixed-size arrays. For those specific operations, performance wouldn't scale well with array size, but nothing else would be changed. Again, I don't have any particular point of view here. I just want to point out that there is prior art. One can sensibly apply the notions of push and pop to a fixed-size array. -- Andy Dougherty dough...@lafayette.edu _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev