Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!usenet.ukfsn.org!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: Teaching kids to program (in Java) Date: Sun, 6 May 2012 12:22:36 +0000 (UTC) Organization: UK Free Software Network Lines: 33 Message-ID: References: <71igo75jrn2rodtmtv8qnc9q6hrl0n6lkt@4ax.com> <4f88c92a$0$293$14726298@news.sunsite.dk> <4f8e22d5$0$293$14726298@news.sunsite.dk> <4f8f4c40$0$291$14726298@news.sunsite.dk> <20638428.276.1334951022461.JavaMail.geo-discussion-forums@pbcsx5> <56h3p7phgturh7hkno6k1q9pfohfdi5b6j@4ax.com> <4fa5c494$0$294$14726298@news.sunsite.dk> NNTP-Posting-Host: 84.45.235.129 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: localhost.localdomain 1336306956 28309 84.45.235.129 (6 May 2012 12:22:36 GMT) X-Complaints-To: usenet@localhost.localdomain NNTP-Posting-Date: Sun, 6 May 2012 12:22:36 +0000 (UTC) User-Agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master) Xref: csiph.com comp.lang.java.programmer:14335 On Sat, 05 May 2012 20:23:45 -0400, Arne Vajhøj wrote: > If you search programming fora for problems relating to: > - max int values > - integer division > - FP inaccuracy > - octal then I think > you will see that octal is not a common problem compared to other > language features. > I've always out that down to hardware changes. Way back when machines using 6 bit ISO characters (ICL 1900 mainframes, Elliott scientific boxes) I used to use octal all the time and didn't recall ever meeting hex, which I first noticed after the switch to byte-oriented architectures. I think that made sense: the 1900 used a 24 bit work that split into 4 6-bit characters so octal works well for bit representations of both words and characters. Hex would be far less useful. OTOH Octal is a bad fit with a byte-oriented architecture for exactly thew same reasons. So, back when C was specified, it made sense to have both hex and octal bit representations because it was being used on both byte and word oriented hardware (didn't some early DEC kit use word and character lengths that were multiples of 3 rather than 4?) but now, with the almost universal adoption of byte-oriented architectures there's little reason, other than historic, to use octal notation. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |