Path: csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Joshua Cranmer Newsgroups: alt.comp.lang.borland-delphi,comp.lang.c,comp.lang.java.programmer Subject: Re: Oracle/Google demonstrate human beings cannot write 10 lines of code without making a mistake ;) Date: Thu, 17 May 2012 17:59:05 -0400 Organization: A noiseless patient Spider Lines: 21 Message-ID: References: <29308868.1994.1337265697084.JavaMail.geo-discussion-forums@pbcuc6> <84131$4fb54067$5419acc3$20839@cache90.multikabel.net> <4e980$4fb56cac$5419acc3$13190@cache60.multikabel.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 17 May 2012 21:59:23 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="pI4Z3tyqu+LR6ovgG/2wGg"; logging-data="28834"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19BzVWNM1QYvBGS9wsxUzcUtFX3FR6d0Bc=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 In-Reply-To: <4e980$4fb56cac$5419acc3$13190@cache60.multikabel.net> Cancel-Lock: sha1:VQ/eV+aDAiA1jNf9dhYTeJ9EHaE= Xref: csiph.com comp.lang.c:20946 comp.lang.java.programmer:14600 On 5/17/2012 5:25 PM, Skybuck Flying wrote: > One such concept is "range". > > It's pretty clearly defined: > > http://en.wikipedia.org/wiki/Range_(computer_programming) > > Any computer language deviating from the standard/common meaning of > range should clearly state so. In 0-based array indexes, the standard interpretation of a range is the half-open model: start <= value < end. Note in particular things like the standard STL idioms, JavaScript slice, python's methods. That you spend so much time arguing that this interpretation is wrong indicates that you don't both to do much programming. Also, note that Wikipedia isn't necessarily correct. -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth