3 ms·
i was sort of hoping for something like https://nullprogram.com/blog/2023/10/08/ https://nullprogram.com/blog/2023/10/08/, which shows a bunch of inventions tha
by kragen 2y ago
i was sort of hoping for something like https://nullprogram.com/blog/2023/10/08/ https://nullprogram.com/blog/2023/10/08/, which shows a bunch of inventions that simplify your programming. some of them may be more trouble than they're worth, but they're at least novel and interesting
by contrast, this document is largely motherhood and apple pie — and where it isn't (e.g., when it advocates titlecasing struct types or never typedeffing primitive types), i often think it's wrong. 'Write assertions to meaningfully crash your program before it does something stupid, ... to prevent a security vulnerability' is especially wrong; one of the major features of the standard assert() macro is that it's turned off in release builds!
the named-arguments macro hack is an example of the kind of thing i was most hoping to find in here
if you write something like this, don't dilute whatever value it may have with your opinions about tabs vs. spaces, line length, what natural language to write your comments and identifiers in, include guards, how many blank lines to put between functions, etc. these have been debated to death, and you're unlikely to have any brilliant insights about them that other people will be happy to have read