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...
0
The B programming language
Started By CodeCat, Feb 01 2009 11:16
7 replies to this topic
#2
Posted 01 February 2009 - 16:16
This sound very hard...
What about /b/ programming language...xD
What about /b/ programming language...xD
Awesome radio
Quote
19:44 - Chyros: I'm very harmless
#3
Posted 01 February 2009 - 16:23
HAI CAN HAS STDIO? I HAS A VAR IM IN YR LOOP UP VAR!!1 VISIBLE VAR IZ VAR BIGGER THAN 10? KTHXBYE IM OUTTA YR LOOP KTHXBYE
http://lolcode.com/
CodeCat
Go dtiomsaítear do chód gan earráidí, is go gcríochnaítear do chláir go réidh. -Old Irish proverb
Go dtiomsaítear do chód gan earráidí, is go gcríochnaítear do chláir go réidh. -Old Irish proverb
#4
Posted 01 February 2009 - 16:35
LOL nice find...
Awesome radio
Quote
19:44 - Chyros: I'm very harmless
#5
Posted 01 February 2009 - 18:54
B is basically the essence of everything I hate about C++.
And lolcode is awesome, but my favorite esoteric programming language is Whitespace, probably the only programming language optimized for saving printer ink. ^^
And lolcode is awesome, but my favorite esoteric programming language is Whitespace, probably the only programming language optimized for saving printer ink. ^^
#7
Posted 01 February 2009 - 21:43
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.
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.
CodeCat
Go dtiomsaítear do chód gan earráidí, is go gcríochnaítear do chláir go réidh. -Old Irish proverb
Go dtiomsaítear do chód gan earráidí, is go gcríochnaítear do chláir go réidh. -Old Irish proverb
5 user(s) are reading this topic
0 members, 5 guests, 0 anonymous users