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


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

Re: BitSet vs BigInteger (false Android doc)

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.glorb.com!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 Tue, 06 Sep 2011 16:34:27 -0500
Date Tue, 06 Sep 2011 14:34:27 -0700
From Patricia Shanahan <pats@acm.org>
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.21) Gecko/20110830 Thunderbird/3.1.13
MIME-Version 1.0
Newsgroups comp.lang.java.programmer
Subject Re: BitSet vs BigInteger (false Android doc)
References <j3rbtv$d5g$1@news.albasani.net> <4e613b65$0$311$14726298@news.sunsite.dk> <yJCdnamwfpVooPzTnZ2dnUVZ_umdnZ2d@earthlink.com> <j3rflb$lh6$2@news.albasani.net> <KOmdnWyhfYV_FPzTnZ2dnUVZ_s-dnZ2d@earthlink.com> <j3tqr7$vp8$1@news.albasani.net> <_ZGdna1ucfWYH__TnZ2dnUVZ_oudnZ2d@earthlink.com> <j3u3me$k4s$1@news.albasani.net> <4e655c24$0$308$14726298@news.sunsite.dk> <j44ga5$970$1@news.albasani.net> <pbmdnZtHEfnnxPvTnZ2dnUVZ_uWdnZ2d@earthlink.com> <j460hs$u3p$1@news.albasani.net>
In-Reply-To <j460hs$u3p$1@news.albasani.net>
Content-Type text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding 7bit
Message-ID <2-udndfe1op-DPvTnZ2dnUVZ_hOdnZ2d@earthlink.com> (permalink)
Lines 31
X-Usenet-Provider http://www.giganews.com
NNTP-Posting-Host 70.230.204.158
X-Trace sv3-tqkcU3ei5PG3QL/N+bzlA/gg6n3QV4Su4qKLt2En0YRE7l3XV4V3KSdi67wMbnHugBADMFmz9NLUmdA!AuNX1d7fUnHbb+pskNFZHVB/JOA6WbzFZVgOeHpf1g/prXFXTddjhEUFTR/khhtksCmXQ8FCibQH!sUCB6JThOHV6Jtex7YlNr2LnBR7pqTH4TIWva9slupnqdmk=
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 3093
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7637

Show key headers only | View raw


On 9/6/2011 1:41 PM, Jan Burse wrote:
> Patricia Shanahan schrieb:
>> conversions. The combination of the comment in question and reading the
>> code shows that they did not take that path. Instead, they always
>> convert for bit manipulation and advise use of BitSet instead.
>
> The Android comment can be corrected as follows:
> "It is adviced to use BitSet if only positive bit patterns
> come into play and if it is possible to use inline modifications."
>
> But the comment should maybe also include a warning, that using
> objects with inline modifications can lead to more programming
> errors. Reasons are for example that the objects are now mutable
> and thus various side effects can occur. Here is an example:
...
> But I guess you all know about these dangers.

Maybe this is a matter of how programmers are expected to respond to
advice to use a class.

My first reaction, before committing to the change or writing a line of
code using the recommended class, would be to find and read its API
documentation. The only exception is if I'm already extremely familiar
with the class. Even if I have used some features, using it in a new
context may call for re-reading the documentation.

If the note came from a tutorial for novice programmers, I would agree
with you. If it comes from ordinary documentation, I think programmers
should be able to draw their own conclusions from the BitSet documentation.

Patricia

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


Thread

BitSet vs BigInteger (false Android doc) Jan Burse <janburse@fastmail.fm> - 2011-09-02 21:48 +0200
  Re: BitSet vs BigInteger (false Android doc) Arne Vajhøj <arne@vajhoej.dk> - 2011-09-02 16:23 -0400
    Re: BitSet vs BigInteger (false Android doc) Patricia Shanahan <pats@acm.org> - 2011-09-02 13:34 -0700
      Re: BitSet vs BigInteger (false Android doc) Jan Burse <janburse@fastmail.fm> - 2011-09-02 22:51 +0200
        Re: BitSet vs BigInteger (false Android doc) Patricia Shanahan <pats@acm.org> - 2011-09-02 18:58 -0700
          Re: BitSet vs BigInteger (false Android doc) Jan Burse <janburse@fastmail.fm> - 2011-09-03 20:15 +0200
            Re: BitSet vs BigInteger (false Android doc) Patricia Shanahan <pats@acm.org> - 2011-09-03 12:37 -0700
              Re: BitSet vs BigInteger (false Android doc) Jan Burse <janburse@fastmail.fm> - 2011-09-03 22:46 +0200
                Re: BitSet vs BigInteger (false Android doc) Patricia Shanahan <pats@acm.org> - 2011-09-03 16:32 -0700
                Re: BitSet vs BigInteger (false Android doc) Jan Burse <janburse@fastmail.fm> - 2011-09-04 02:58 +0200
                Re: BitSet vs BigInteger (false Android doc) Arne Vajhøj <arne@vajhoej.dk> - 2011-09-05 19:32 -0400
                Re: BitSet vs BigInteger (false Android doc) Jan Burse <janburse@fastmail.fm> - 2011-09-06 08:58 +0200
                Re: BitSet vs BigInteger (false Android doc) Lew <lewbloch@gmail.com> - 2011-09-06 00:41 -0700
                Re: BitSet vs BigInteger (false Android doc) Jan Burse <janburse@fastmail.fm> - 2011-09-06 11:57 +0200
                Re: BitSet vs BigInteger (false Android doc) Jan Burse <janburse@fastmail.fm> - 2011-09-06 12:12 +0200
                Re: BitSet vs BigInteger (false Android doc) Jan Burse <janburse@fastmail.fm> - 2011-09-06 12:44 +0200
                Re: BitSet vs BigInteger (false Android doc) Jan Burse <janburse@fastmail.fm> - 2011-09-06 12:02 +0200
                Re: BitSet vs BigInteger (false Android doc) Patricia Shanahan <pats@acm.org> - 2011-09-06 13:38 -0700
                Re: BitSet vs BigInteger (false Android doc) Patricia Shanahan <pats@acm.org> - 2011-09-06 10:33 -0700
                Re: BitSet vs BigInteger (false Android doc) Jan Burse <janburse@fastmail.fm> - 2011-09-06 22:28 +0200
                Re: BitSet vs BigInteger (false Android doc) Jan Burse <janburse@fastmail.fm> - 2011-09-06 22:41 +0200
                Re: BitSet vs BigInteger (false Android doc) Patricia Shanahan <pats@acm.org> - 2011-09-06 14:34 -0700
                Re: BitSet vs BigInteger (false Android doc) Lew <lewbloch@gmail.com> - 2011-09-06 14:51 -0700
                Re: BitSet vs BigInteger (false Android doc) Jan Burse <janburse@fastmail.fm> - 2011-09-07 00:33 +0200
                Re: BitSet vs BigInteger (false Android doc) Jan Burse <janburse@fastmail.fm> - 2011-09-07 00:40 +0200
            Re: BitSet vs BigInteger (false Android doc) Arne Vajhøj <arne@vajhoej.dk> - 2011-09-05 19:26 -0400
      Re: BitSet vs BigInteger (false Android doc) Robert Klemme <shortcutter@googlemail.com> - 2011-09-03 17:01 +0200
    Re: BitSet vs BigInteger (false Android doc) Jan Burse <janburse@fastmail.fm> - 2011-09-02 22:49 +0200
      Re: BitSet vs BigInteger (false Android doc) Gene Wirchenko <genew@ocis.net> - 2011-09-02 14:48 -0700
  Re: BitSet vs BigInteger (false Android doc) Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-03 13:54 -0400

csiph-web