[Gambas-user] Some suggestion

Jose J. Rodriguez joe1962 at ...626...
Sun Dec 3 19:04:51 CET 2006


On 12/3/06, Rob <sourceforge-raindog2 at ...94...> wrote:
> On Saturday 02 December 2006 18:24, Christopher Brian Jack wrote:
> > stack pulls, by convention, return the top element of the
> > stack before moving the stack pointer (postincrementing the
> > stack pointer) and pushes, by convention, move the stack
> > pointer before storing the data (predecrementing stack
> > pointer).  Virtually every CPU (and compsci textbook) out
> > there uses these same semantics for stack operations.
>
> The terminology in my CS textbooks all those years ago was "push
> and pop", not "push and pull".  Gambas already has Push() and
> Pop().... jum was just looking for a method of the Array object
> that acted like Push and Pop, but would operate on any element
> of an array, not just the top (last) element.
>
> I personally would like to see equivalents to Shift and Unshift
> (perl functions that behave like Pop and Push but on the bottom
> (first) element of a list rather than the top element,) but the
> Add method combined with a Remove method that returned the value
> it removed would be good enough for me.
>

I think using Remove for getting values could be confusing. Maybe we
need MultiPop and MultiPush?

Regards,
Joe1962




More information about the User mailing list