4 ms·
Well it stands to reason that the Plan 9 code would work that way if Rob Pike made the comment. I'm just wondering if anyone else found this way of coding attra
by apaprocki 15y ago
Well it stands to reason that the Plan 9 code would work that way if Rob Pike made the comment. I'm just wondering if anyone else found this way of coding attractive. Everything I've seen points to "no".
- 4ad 15y agoDennis Ritchie, creator of C? Ken Thompson, creator of Unix?
- catwell 15y agoThere is even a relatively popular piece of software dedicated to helping developers use this style: http://code.google.com/p/include-what-you-use/ http://code.google.com/p/include-what-you-use/
- apaprocki 15y agoThat 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.
- charolastrauno 15y agoThat's not true - you can't forward-declare types used in class member variables for instance.