Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!feeder2.news.elisa.fi!feeder1.news.elisa.fi!uutiset.elisa.fi!7564ea0f!not-for-mail From: Jukka Lahtinen Newsgroups: comp.lang.java.programmer Subject: Re: Never using booleans as parameters Organization: N/A References: <87lh9tysy8.fsf@Equus.decebal.nl> <564f55e3$0$23775$e4fe514c@news.xs4all.nl> <565310cd$0$23766$e4fe514c@news.xs4all.nl> <9993c30e-bbd7-4a87-82c9-de208d61cf39@googlegroups.com> <075p5b1nr8bd1gs6264g4mmhfbfb2jghvb@4ax.com> X-no-archive: yes Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:8QRtSmOtdEabCzXkfvQMlJ3HAxk= MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Lines: 18 Date: Wed, 02 Dec 2015 15:51:46 +0200 NNTP-Posting-Host: 91.155.88.191 X-Complaints-To: newsmaster@saunalahti.com X-Trace: uutiset.elisa.fi 1449064306 91.155.88.191 (Wed, 02 Dec 2015 15:51:46 EET) NNTP-Posting-Date: Wed, 02 Dec 2015 15:51:46 EET Xref: csiph.com comp.lang.java.programmer:33266 Gene Wirchenko writes: > On Sun, 29 Nov 2015 15:45:39 -0500, Arne Vajhøj >>On 11/23/2015 9:10 AM, Eric Douglas wrote: >>> // beginIndex (zero-based), endIndex >>> y = x.substring(0,4) >>Documenting something like this is an indication of a problem >>in my opinion. > But documenting something as 0-based when that is unusual would > be a good idea. (I know that it is not that here.) Documenting whether something is 0-based or 1-based is ALWAYS a good idea, no matter which one is usual in which case. -- Jukka Lahtinen