you are viewing a single comment's thread.

view the rest of the comments →

[–]zyxzevn 1 insightful - 2 fun1 insightful - 1 fun2 insightful - 2 fun -  (1 child)

It was designed with the "bad is good" principle. The idea that, if it works for most of the time, it is ok.
So, it is not designed to work all of the time. Or at least with a well defined sub-set.

From the low level, the problem is that everything is cast to an integer. Like one that fits in a register.
So a character is an integer, a boolean is an integer, any address is an integer. Etc. And this is usually not true on low level.

Another problem is the mixing of statements and expressions. Like "ptr++".
This becomes unpredictable with: "(p==(++p))?p++!p--)"

But by mixing integers and addresses made it possible to make complicated memory structures. Like: "value= Tensor[row4+ column+ depth16+ plane*64].imaginary"

So the memory is complicated by default, including memory management.

[–]bobbobbybob 2 insightful - 1 fun2 insightful - 0 fun3 insightful - 1 fun -  (0 children)

I must confess to abusing the fuck out of C to get it to do fancy multidimensional math in tiny amounts of memory, reducing paging as much as possible (rooms full of RAID to get fastest non-volatile paging possible for the big data sets we were using in the 90's)