BCPL, a predecessor of 'C'(lysator.liu.se)
lysator.liu.se
BCPL, a predecessor of 'C'
http://www.lysator.liu.se/c/clive-on-bcpl.html
4 comments
That's absolutely amazing, I thought BCPL was long dead.
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.
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.
While I'm sure you understand the distinction, I think a lot of people miss this:
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".
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".
I thought maybe it was just me. When I was a postgrad at Cambridge (2003-2006) I supervised for this course a few times, thinking that a course surveying a bunch of interesting languages would be fun. I seem to recall a bit of smalltalk thrown in, but it was mostly BCPL. I walked by Martin Richards' office and noticed a poster announcing a port of BCPL to .NET or some similar abomination.
It's time to let it go...
It's time to let it go...
I liked BCPL, and still prefer it to C, but I taught it to myself, and never took lectures from Martin Richards.
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.
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.
Kaz took a stab at it recently and found a few surprising features that didn't remain in C:
http://groups.google.com/group/comp.lang.lisp/browse_thread/...
In Summary:
I didn't say BCPL is better than its successors. Only that not everything in its successors is strictly an improvement over its BCPL counterpart.
http://groups.google.com/group/comp.lang.lisp/browse_thread/...
In Summary:
I didn't say BCPL is better than its successors. Only that not everything in its successors is strictly an improvement over its BCPL counterpart.
BCPL's predecessor, CPL, had even more features: things like type inference, closures, polymorphism. It was never completely implemented. The machines at the time were too small - 4kwords being a typical size. It would probably be fairly easy nowadays.
I think the reason for a good bit of that is that BCPL was first stripped to produce 'B', then expanded again to produce 'C'.
Interesting that BCPL included both one-line and multi-line comments, but C did not.
I used the BBC micro version by Acornsoft in the gray past, it made the transition to C a lot easier when I finally got my hands on a C compiler (on a PDP 11 bought for scrap...).
Yes Acorn/Acornsoft did do for some "off the track" languages.... I recall they did COMAL as well.
There was a LISP as well.
[My school, suddenly in possession of a gifted CS centre full of Beebs, wound up giving charge of the syllabus after two years to someone who promptly decided to teach COMAL to everyone in place of (the very sophisticated, for its time, and structural) BBC Basic. Fortunately I missed out there but they must have turned out the better part of a thousand basic-level COMAL coders for no good reason. Apparently these days the same guy's got all the 14-year-olds passing tests in, but almost certainly not understanding, Smalltalk instead.]
[My school, suddenly in possession of a gifted CS centre full of Beebs, wound up giving charge of the syllabus after two years to someone who promptly decided to teach COMAL to everyone in place of (the very sophisticated, for its time, and structural) BBC Basic. Fortunately I missed out there but they must have turned out the better part of a thousand basic-level COMAL coders for no good reason. Apparently these days the same guy's got all the 14-year-olds passing tests in, but almost certainly not understanding, Smalltalk instead.]
Don't see any mention of O-code in that article?
O-Code Machine, a predecessor of JVM:
O-Code Machine, a predecessor of JVM:
http://en.wikipedia.org/wiki/O-code_machine
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".