4 ms·
I agree with the first part -- which is why I don't like low-level languages like C. I can't count the number of times I've encountered old C code that uses po
by ken 7y ago
I agree with the first part -- which is why I don't like low-level languages like C.
I can't count the number of times I've encountered old C code that uses pointers and bytes and arrays, and I discover a bug, and on further inspection I can't even figure out what they were trying to do. It's all just pointers and bytes and arrays. The language is too low-level to encode intent, except at the lowest level, so you're putting all your trust in comments.
- empthought 7y agoYou can also use structs and preprocessor macros. Have a look at the PostgreSQL source sometime.
- clarry 7y agoFunctions are the basic abstraction in C. They are good for describing intent. Likewise, structs are good for giving pointers and bytes meaning. Pointers and bytes and arrays are the least of all my problems in dealing with old C code.