Re: Java Indexing- Historical question



Eric Sosman wrote:
Martin Gregorie wrote:
On Sun, 25 Jan 2009 19:27:07 -0800, Tom McGlynn wrote:

This is an interesting and somewhat religious topic. I'm fairly
agnostic on the choice between the two. Nor am I sure the benefits of
allowing the user to specify the bounds would outweigh the cost of
ambiguity in understanding what an array index means in an arbitrary
context. [

The ability to specify upper and lower bounds is probably more useful in engineering and scientific programs than in commercial code and processing logic. [...]

long[] endOfYearBalancesThisDecade = new long[2001:2010];

(Imaginary syntax, of course.)

= new long[2000:2009];

--
Lew
.



Relevant Pages

  • Re: Java Indexing- Historical question
    ... Martin Gregorie wrote: ... allowing the user to specify the bounds would outweigh the cost of ... The ability to specify upper and lower bounds is probably more useful in engineering and scientific programs than in commercial code and processing logic. ...
    (comp.lang.java.programmer)
  • Re: Array with unknown number of dimensions
    ... This is without any rank funniness. ... You can specify the lower bounds of an assumed shape dummy. ... In fact, you basically always specify them, explicitly or implicitly. ... Contrast that with pointer dummies where you always assume the lower bound and cannot specify it. ...
    (comp.lang.fortran)
  • Re: Pointer arithmetic with C_F_POINTER
    ... With Fortran pointers and arrays, ... It the lower bounds were zero, then it would make it C like. ... Fortran 2003 allows you to specify alternate bounds on a pointer assignment, ...
    (comp.lang.fortran)