Hacker News new | past | comments | ask | show | jobs | submit login

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...




Exactly, I think the article is a bit self centered and overlooks this concept


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.


Functions 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.


You can also use structs and preprocessor macros. Have a look at the PostgreSQL source sometime.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: