avidya

joined 6 days ago

If I am not mistaken, the argument made by papers like "C is not a low level language" is that C used to be a low level language, because it fit the architecture of a PDP, but a modern computer isn't a PDP, and so C isn't low level.

 

An intresting talk on Is Everything a File, IO Models, Is C a Low Level Language, and a quick comparison on Interfacing with USB devices on Mac OS, Linux and Windows.

[โ€“] avidya@programming.dev 1 points 4 days ago* (last edited 4 days ago) (2 children)

Did you know that

	int history[10] = {0,0,0,0,0,0,0,0,0,0};  

is the same thing as

        int history[10] = {0};

And an idom in C would be to define a constant for the size like this

enum { HISTORY_MAX = 10};
int history[HISTORY_MAX] = {0};
int history_limit = HISTORY_MAX;