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

> The beauty of using C these days is that one gets to control every single byte

No, not even close: Struct padding, compiling switch as if-else vs. jump, implicit arithmetic promotion to int, stack layout of local variables, and many other issues.

If you want to control every byte, write in assembly language.




Nit: struct padding and arithmetic promotion don't support this point. In practice, C compilers provide struct-packing extensions that cover the uncommon cases where default padding wouldn't yield the layout you want. And they'll let you opt-in to a style where arithmetic promotions are forced to be explicit as they are in e.g. Go. So it would usually be ridiculous to drop down to assembly for either of these reasons today.




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

Search: