Skip to content

Comment on Notes on Programming in C - Rob Pike, February 21, 1989parent

Comments

That is not the stated purpose of the tool (to write code in the aforementioned style):

  "Include what you use" means this: for every symbol (type,  
  function variable, or macro) that you use in foo.cc, either 
  foo.cc or foo.h should #include a .h file that exports the 
  declaration of that symbol.
I agree 100% with that statement. According to the style, foo.h can never #include anything.

That's not true - you can't forward-declare types used in class member variables for instance.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.