4 ms·
Let me answer this once and for all: > What are we optimizing for? You mean who are we optimizing for. For the guy who has to understand and maintain this cod
by panpanna 7y ago
Let me answer this once and for all:
> What are we optimizing for?
You mean who are we optimizing for. For the guy who has to understand and maintain this code 2 years from now. (This guy could in fact be you yourself).
Thats why I like Go. And C, now that I think about it...
- yahyaheee 7y agoExactly, I think the article is a bit self centered and overlooks this concept
- ken 7y agoI 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.