James Knott said the following on 06/26/2012 08:22 AM:
Philipp Thomas wrote:
quite a number of programs still couldn't cope with the fact that pointers exceeded the size of an int
Several years ago, I took a C programming course at a local college. In class we used Borland's Turbo C++ on Windows 3.1. At home I had Borland C++ running on OS/2. On a few occasions I got burned by the difference in int size, as Turbo C++ had 16 bit int, but Borland C++, 32. So, I'd write a program and it'd run fine on my home computer, but fail in class
Nothing new here; this has been plaguing programmers since C ran on anything except a PDP-11. Think Miller's port to the Interdata; think the SUN and the VAX at the beginning of the 80s. And worse, many programmers embedded characteristics of the VAX or the SUN in their code and hence 'Everything is a SUN/VAX' passed into the vocabulary. And then the BigEndian/SmallEndian wars turned in to the IXNU wars ... In the early 80s I was working for a UNIX developer and had the job of reviewing the SYSV packages from Bell's USG for such issue. USG had managed to take a lot of clean, well written code form the people who wrote V6 and V7 (take a look at John Lion's book - I showed it to a student learning C and her reaction was 'Why aren't we being taught with examples that are as easy to understand as that?') and make an incomprehensible mess of it. Thankfully much of the 'core code' (both kernel and apps) of Linux seems to be more comprehensible - at least to the people who work with it. You might, for example, compare the code of VIM to the original VI code of the 1980s. OUCH! -- Asking if computers can think is like asking if submarines can swim. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org