The B programming language

Yesterday I was reading a bit about programming and came across a language called B. It probably doesn't surprise you that it's the predecessor of C. It does look at lot like C (for those of you who know it) but it's a bit... different.

You might be aware that C, as well as other languages such as C++, Java, Visual Basic, Pascal etc all have a selection of variable types (int, float, bool, string etc.), as well as composite types like structs, records and classes. B has NONE of that. In B, all variables are integers, and all functions return int, no exceptions. B does have pointers like C does, but since everything is an integer, the only way to get a pointer to some other variable is to store the address of it in a variable (which of course is an int). And then of course you can dereference it with * like in C, but since B has no types you can dereference ANYTHING. So you can imagine that programming in B is a bit awkward, and certainly not as safe as in most other languages. Some people call C 'platform independent assembly', but I would say B is that even moreso...

B was designed in 1969, C started off a few years after that. C++ didn't come around till 1986.

B didn't have any casts, since there were no data types. If you wanted to do floating point stuff you were probably screwed, or you had to use some library functions to do it. Back in those days, floating point support was rare anyway. Even on the PC platform, there was no support for floating point operations, and you needed to buy a separate 'math coprocessor' to use floats. The 386DX processor (in 1986) was the first CPU to offer floating point support without needing a coprocessor, but there were still lower-end 386SX and 486SX models which lacked floating point support, and it wasn't until the Pentium (in 1993) that the coprocessor became entirely redundant.