by jlees · 17y ago · 0 comments
I first encountered BCPL when I was at Cambridge University, the home of the language and its designer, Martin Richards.
Same. I was taught this during my undergrad (in the ancient times of 2002-3ish). A course on "Comparative Programming Languages" ended up as 7 lectures on BCPL and 1 on everything else (Lisp, Smalltalk, stuff like that. I think.) It was terrible.
I now have an in-built knee-jerk reaction to hate BCPL. Especially since he (Martin Richards, who should never be allowed to lecture, ever) spent at least one lecture teaching us how to implement types in BCPL.
Yeah. Typed BCPL. Last time I checked, that was called "C".
Or rather, it seems that it is long dead but that this particular lecturer can't get off his hobby horse.
That's archaeology, not 'comparative programming languages'.
It's a bit like going somewhere to study French and getting a course in Latin instead.
When BCPL or B are said to be "untyped", it's not in the same sense as Lisp is dynamically typed. These are languages for word-oriented computers, without byte-addressable memory. Everything the CPU can do is on a single word of the same size, and memory is just an array of them. So it's untyped in the sense that in C you can do math on both integers and pointers, and convert between them.
What C added was originally byte orientation, "typing" was just the glue required to make that work (so that e.g. an int was 2 chars on a PDP-11). Only later on were first class arrays and structures added to the "type system", and likewise the space of "pointers to types".
It's time to let it go...
Most of the computing done for my PhD was done in BCPL. I still have the code somewhere, but I can't convert it to C because it uses co-routines.