Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
badsectoracula
on Jan 4, 2023
|
parent
|
context
|
favorite
| on:
CLib: Header-only C library that implements the mo...
`#include "foo.c"` would repeat the implementation in multiple object files which is both wasteful and, if not using static, create conflicting symbols.
linkdd
on Jan 4, 2023
[–]
You missed the "with extra steps".
#define XXX_IMPL #include "xxx.h"
And
#include "xxx.c"
Are exactly the same trash.
badsectoracula
on Jan 4, 2023
|
parent
[–]
No they are not, the former allows you to include the header file in multiple .c files, the latter does not.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: