I have written a LOT of code in C for various 8-bitters.
Including "C" compilers that do not have a stack.
That is actually a feature, not a bug, for embedded systems where memory is scarce and you don't even have an OS to step in and clean things up if your app runs out of memory.
-
No stack. No dynamic memory allocation. It is a feature.
(not to you but who you responded to. C works just fine on modern current day 8-bitters. The software that runs on the 8032-clone or equivalent inside your sd-card is written in C)
I'm mostly going off of 6502, with an 8 bit stack and no (easy) stack relative addressing, and what I've heard from other people. Maybe I should have said that there are some systems where C is a poor choice (for fast/low-level code) instead of generalizing all 8-bit ISAs.
It really doesn't. We live in a world of multicore, superscalar CPUs with multiple layers of cache that look nothing like the PDP-11s the C virtual machine is predicated on.
Apart from multi-threading and SIMD, which is definitely a shortcoming of C, unless you are writing super optimized low-level code, those kind of details don't really matter from the programmers perspective. Superscalar and OoO execution and caching are pretty much entirely transparent by design. The machine code is still basically the same, and that is what the CPU is designed to execute fast.
"At least a minimum size" != a guaranteed size, hence why people have to use kludges to specify the exact size.
Like Creative Username said, fixed width types are standard nowadays. That said, how often does the exact width of an int matter compared to just knowing that it is "big enough" for the range of values you want? Even where it does matter, you can just mask it down to an exact width trivially.
also by "programming model", the guy you are replying to might mean something like "how c makes it easy to fuck around with memory and shit", not "how c maps directly to the inner workings of the machine"
I meant C maps nicely to assembly, basically. And "programming model" as in the abstract "system" that is available to a programmer to work within, but independent of the underlying implementation.
Also so this post isn't entire off-topic, I found this a while back:
https://gitlab.com/drummyfish/small3dlib
Pretty cool open source project. I wonder what the creator is li-


...
Here is the website for anyone interested:
https://web.archive.org/web/20251011111839/https://www.tastyfish.cz/ (the current site is different)