[Gambas-user] Some suggestion + feature missing
Benoit Minisini
gambas at ...1...
Sat Dec 23 19:43:24 CET 2006
On Thursday 14 December 2006 17:27, jum wrote:
> Date: Sun, 3 Dec 2006 04:11:35 -0500
>
> > From: Rob <sourceforge-raindog2 at ...94...>
> > Subject: Re: [Gambas-user] Some suggestion
> > To: gambas-user at lists.sourceforge.net
> > Message-ID: <200612030411.35748.sourceforge-raindog2 at ...94...>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > 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.
> >
> > Rob
>
> I am not only wants a solution but I need it simple (short) too,
> so I prefer pop(i) rather than remove(i). May be Benoit knows me better
> about it. So I always use:
> - x,y,w,h rather than top,left,wide,height
> - object.max than object.count - 1 (actually I ask Benoit to add it)
Maybe I could a synonymous support directly in the compiler, so that:
A.Top is replaced by A.y, A.Left by A.x, and so on. A.Max will be
automatically replaced by (A.Count - 1). I will study what I can do...
> - IF without THEN if more than one line (I also beg Benoit to make THEN
> optional, which make him called me lazy guy:-)
> - if() rather than iif()
> - and other feature like that (I hope it much in the future)
>
> So because my preference is like that, I want to ask about 1.9.46a version:
>
> - why iif() should have 3 mandatory parameters, I would like the old one.
> So we can use:
> PRINT "blablabla" & if(again, "blablabla") & if(more, "blablabla")
> rather than:
> PRINT "blablabla" & if(again, "blablabla", "") & if(more, "blablabla",
> "") actually I have a lot of code like this.
>
> - why max() and min() only use 2 argument so insted of using:
> PRINT max(a,b,c,d,e)
> we should use:
> PRINT max(max(max(max(a,b),c),d),e) ' confusing, eh
> or may be:
> PRINT max(max(max(a,b),max(b,c)),e) ' still confuse?
> actually right now I am not have code like thit, but I think it can
> happen to someone else.
Max() or Min() with more than two arguments is very rare, but I admit that
If() with two arguments only can be useful. Alas this syntax will only be
possible in Gambas 3.
>
> So without it it like some gambas feature missing, so I hope it only
> temporary because of some quick-fix of a bug make it like that.
>
> Regards,
>
> L. Jumadi
>
Regards,
--
Benoit Minisini
More information about the User
mailing list