Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Andreas Leitgeb Newsgroups: comp.lang.java.programmer Subject: Re: Inclusive or exclusive array Date: Thu, 1 Aug 2019 08:02:33 -0000 (UTC) Organization: A noiseless patient Spider Lines: 19 Message-ID: References: <87zhkvmqx8.fsf@munus.decebal.nl> <87v9vjmkkn.fsf@munus.decebal.nl> Reply-To: avl@logic.at Injection-Date: Thu, 1 Aug 2019 08:02:33 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="31f9a5f385caa3ceaf60276836c4fa0d"; logging-data="9815"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19vcaxBwPcfW5ahEqp0CTD9" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:X78fVzLIdylayFqDD0S0ODnlDXM= Xref: csiph.com comp.lang.java.programmer:39050 Eric Sosman wrote: > What I *did* mean was > - (inclusive start, exclusive end) is most common > - (inclusive start, length) is seen, less commonly > - (inclusive start, inclusive end) is seen, but is rare Just curious: on what analysis is this based? - some complete classification of all range-accepting JSL methods? - some complete classification of those JSL methods you actually use? - gut feeling based on the JSL methods you actually use? ;-) I'm not disputing it, but there might be different results based on different weighing of importance of each method, and whether one only considers integral ranges or also float,Date,... ranges. PS: my own gut feeling was that ranges in Java "from/length" would be more common for integral, while in C++ "from/excl-to" would be more common - as in C+++ integral ranges are often just a special case of iterator-based ranges.