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


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

Re: Teaching kids to program (in Java)

From Martin Gregorie <martin@address-in-sig.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Teaching kids to program (in Java)
Date 2012-05-06 12:22 +0000
Organization UK Free Software Network
Message-ID <jo5qec$rkl$4@localhost.localdomain> (permalink)
References (7 earlier) <j01kr.10057$kb7.6920@newsfe20.iad> <tok1p7dl1cp7ipt59ilg4d0uk6jf20q07s@4ax.com> <20638428.276.1334951022461.JavaMail.geo-discussion-forums@pbcsx5> <56h3p7phgturh7hkno6k1q9pfohfdi5b6j@4ax.com> <4fa5c494$0$294$14726298@news.sunsite.dk>

Show all headers | View raw


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       |

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


Thread

Re: Teaching kids to program (in Java) Arne Vajhøj <arne@vajhoej.dk> - 2012-05-05 20:23 -0400
  Re: Teaching kids to program (in Java) Martin Gregorie <martin@address-in-sig.invalid> - 2012-05-06 12:22 +0000
    Re: Teaching kids to program (in Java) Arne Vajhøj <arne@vajhoej.dk> - 2012-05-06 11:36 -0400
    Re: Teaching kids to program (in Java) glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-05-06 17:10 +0000
  Re: Teaching kids to program (in Java) Gene Wirchenko <genew@ocis.net> - 2012-05-07 09:43 -0700
    Re: Teaching kids to program (in Java) Martin Gregorie <martin@address-in-sig.invalid> - 2012-05-07 18:17 +0000

csiph-web