Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #7216

Re: enhance an array's static type by a lower length-bound.

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date Thu, 18 Aug 2011 08:34:16 -0500
Date Thu, 18 Aug 2011 06:34:14 -0700
From Patricia Shanahan <pats@acm.org>
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11
MIME-Version 1.0
Newsgroups comp.lang.java.programmer
Subject Re: enhance an array's static type by a lower length-bound.
References <slrnj4nm33.6gl.avl@gamma.logic.tuwien.ac.at> <6k7p47d9442mcld6j2p5l4hekodard6oss@4ax.com> <4c11ff9c-3c83-45cc-85a7-9b0c05de17ff@glegroupsg2000goo.googlegroups.com> <slrnj4pr3b.6gl.avl@gamma.logic.tuwien.ac.at>
In-Reply-To <slrnj4pr3b.6gl.avl@gamma.logic.tuwien.ac.at>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Message-ID <W4-dnThc3ORFidDTnZ2dnUVZ_oydnZ2d@earthlink.com> (permalink)
Lines 25
X-Usenet-Provider http://www.giganews.com
NNTP-Posting-Host 70.230.203.65
X-Trace sv3-b9Wtb1p+B1v7nSjpTYmoP8a5ViWrTfWaf5SyJEMA7+ErppbrwjH2Z0KcEnJS/538y140DbEHTQr72Uy!nIRdhpbSsJpWBFx9D933DBCiR1MlZSYLvozy5ZAGK1eNWtPsarz1yW5Befj6fP3uq3shkPFAxEWu!o25xlgc09Crt7HALquZqbPn5EeBjwxK5Ajl1tV43Iu2Pow==
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 2557
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7216

Show key headers only | View raw


On 8/18/2011 3:41 AM, Andreas Leitgeb wrote:
> Unfortunately, Roedy completely misunderstood what my post was about.
>
> It was not about lower-bounding the indices, but about lower-bounding
> the *length* - thus morphing certain runtime-ArrayIndexOutOfBoundExceptions
> into compile-time errors.  Are my postings really that hard to grasp?
> Even the examples I provided?

I think the confusion may have arisen because a lot of us are familiar
with specified index lower bounds from the languages we know that
implement them.

I don't think I've ever seen a language with dynamic array creation that
has a lower bound on the length of an array a variable can reference.
I'm not sure how it would work, or how I would use it.

Usually, if I have a non-zero lower length bound it is 1 or 2, but most
of my array handling code is designed and tested for zero length and up.
Even when there is a lower bound, I'm not sure knowing it would help
much with compile time error detection. For example, a method to
calculate the sample mean of some observations requires at least one
element, but is going to iterate over the whole array.

Patricia

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

enhance an array's static type by a lower length-bound. Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-08-17 15:04 +0000
  Re: enhance an array's static type by a lower length-bound. Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-08-17 12:34 -0500
    Re: enhance an array's static type by a lower length-bound. Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-08-18 13:14 +0000
      Re: enhance an array's static type by a lower length-bound. Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-08-18 10:30 -0500
        Re: enhance an array's static type by a lower length-bound. Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-08-18 18:12 +0000
          Re: enhance an array's static type by a lower length-bound. Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-08-18 20:59 -0500
  Re: enhance an array's static type by a lower length-bound. Robert Klemme <shortcutter@googlemail.com> - 2011-08-17 20:42 +0200
    Re: enhance an array's static type by a lower length-bound. Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-08-18 21:44 +0000
      Re: enhance an array's static type by a lower length-bound. Robert Klemme <shortcutter@googlemail.com> - 2011-08-19 13:24 +0200
        Re: enhance an array's static type by a lower length-bound. Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-08-20 17:20 +0000
  Re: enhance an array's static type by a lower length-bound. Roedy Green <see_website@mindprod.com.invalid> - 2011-08-17 22:11 -0700
    Re: enhance an array's static type by a lower length-bound. Lew <lewbloch@gmail.com> - 2011-08-17 23:17 -0700
      Re: enhance an array's static type by a lower length-bound. Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-08-18 10:41 +0000
        Re: enhance an array's static type by a lower length-bound. Patricia Shanahan <pats@acm.org> - 2011-08-18 06:34 -0700
          Re: enhance an array's static type by a lower length-bound. Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-08-18 18:08 +0000
            Re: enhance an array's static type by a lower length-bound. Roedy Green <see_website@mindprod.com.invalid> - 2011-08-18 17:53 -0700
              Re: enhance an array's static type by a lower length-bound. Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-08-20 17:31 +0000
                Re: enhance an array's static type by a lower length-bound. Lew <lewbloch@gmail.com> - 2011-08-20 10:50 -0700
                Re: enhance an array's static type by a lower length-bound. Robert Klemme <shortcutter@googlemail.com> - 2011-08-21 10:47 +0200
          Re: enhance an array's static type by a lower length-bound. Michal Kleczek <kleku@poczta.onet.pl> - 2011-08-21 20:27 +0200

csiph-web