Hacker News new | ask | show | jobs
by gosu 5002 days ago
I'd say that it's bad to put #pragma once in your minimal set, since it's nonstandard. Why not use plain old include guards?

For me, container_of() is also indispensable. Although maybe it's on the level of 'errno' as being "not really a dirty macro".

1 comments

I know - I was just spitballing the minimum number, since guards require conditionals too. Though, portability aside, you have to agree that it's simply nicer, since it plainly states the intent without requiring a little dance each time.