Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
What C coding style do you use (K&R, C89, C99, etc.) and why?
4 points by DenisDolya 4 months ago | hide | past | favorite | 2 comments


When I learnt C via the "learn C++ in 24 hours" type book. It was heavily C99, c11 wasnt a thing yet, oh hey what's that grey hair. I later actually went more GNU style. More functional C vs object orientated like C++ that they taught. I practically never coded a class in C.

I havent coded in C in over 10 years now. I view it as a dead language. If you really need C-like language. Definitely go rust, no question.

Today if im not coding in python, it's html/css templates being used by python.


If I'm programming with/for others, I use the style the team has adopted. If I'm working with existing code, I maintain the style already used by it.

For my own projects, my preferred style isn't purely any of the ones you list. It's a mongrel style. I do it that way because I choose my style elements to most closely match the way my brain works.




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

Search: