Hello Coin

Llewellyn Falco isidore at setgame.com
Wed Nov 20 13:54:50 PST 2013


I could make a class

new TrueArray<Integer>(-100, 100);

of course this would also work with just a HashMap,

also:
new array[100];
isn't legal java syntax unless you have defined a class name 'array'


anyways, the point was; Does adding this to the core language really
improve the language or just clutter it?
perhaps a better way of phrasing it would be how much java code and
mistakes are going to be improved by adding this to the language. if that
number isn't very large, it's probably better to keep it in user libraries.



On Wed, Nov 20, 2013 at 1:35 PM, Francis ANDRE <
francis.andre.kampbell at orange.fr> wrote:

>  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> 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
> www.teachingkidsprogramming.org
>
>
>


-- 
Llewellyn Falco
www.approvaltests.com
www.teachingkidsprogramming.org


More information about the coin-dev mailing list