Hello Coin
Francis ANDRE
francis.andre.kampbell at orange.fr
Wed Nov 20 13:35:25 PST 2013
Hi Llewellyn
Le 20/11/2013 22:28, Llewellyn Falco a écrit :
> While these are interesting cases.
> Why should this be a language feature as opposed to a custom implementing class?
I do not catch you question. Could you be more explicit?
>
>
> On Wed, Nov 20, 2013 at 12:47 PM, Francis ANDRE
> <francis.andre.kampbell at orange.fr <mailto:francis.andre.kampbell at orange.fr>>
> wrote:
>
> Hi Coin List
>
> I did not receive any answer on my previous request which means certainly that
> there is no more open call for proposals. Anyway, I will bring my 2 cents
> to the
> coin distributor!...
>
>
> I would like Java to offer "true" array/arrays... And you would say: Hey guy,
> what is a "true" array, Java gets already the array concept... Well, let me
> explain a little bit. In java one declares an array of int for example as
>
> int[] myInts; // myInts, an array of int
>
> and the allocation of the array by
>
> myints = new array[10]; // myints is an array of 10 int
> myints[0] = 90; // the int at index 0 is now 90. The index of an array starts
> at 0 and ends at myints.length - 1
> myints[9] = 99; // the int at index 9 is now 99
>
>
> This view of an array starting at 0 is more an implementer view that is
> considering the first element of the array is starting at the offset 0 of the
> base of the array....But in mathematics, an array has usually an lower
> bound and
> an upper bound which are not always 0 and length - 1. Thus from my point of
> view, an "true" array should have a lower bound and an upper bound as in many
> others computer languages (as Algol, PL/1 for example)
>
> Thus, I would propose a more abstract view of an array like
>
> int[] myints;
> myints = new array[-100:100];
> myints[-100] = 0;
> myints[0] = 0;
>
> with obviously all adapted controls and exception like an index out of array
> range and a length = upperbound - lowerbound + 1
>
> myints[500] = 0; // throw an index out of array bound exception
> myints.length == upperbound - lowerbound + 1 // this is true
>
> That's all folks!
>
> FA
>
>
>
>
>
>
> Le 23/10/2013 08:03, Francis ANDRE a écrit :
> > Hi Coin list
> >
> > I discovered this discussion list recently -- coin is not an obvious
> slang for a
> > non US guy, so the discovery was more by curiosity than understanding --
> and I
> > am wondering if there will be another open call for proposals in near
> future?
> >
> > Francis
> >
> >
>
>
>
>
>
> --
> Llewellyn Falco
> www.approvaltests.com <http://www.approvaltests.com>
> www.teachingkidsprogramming.org <http://www.teachingkidsprogramming.org>
>
More information about the coin-dev
mailing list