Remix.run Logo
colleagueRiley 10 months ago

Well for one you're able to easily use macros to customize features you want and don't want. Plus "forcing me to figure out the specific XYZ_IMPLEMENTATION" is a big of a weird compliant. You could say the same thing about linking a library. Besides, it's not hard to figure out and is usually one of the first lines of the file.

The single-header format also gives you MORE ways to compile the library and control which features to use or not use.

uecker 10 months ago | parent [-]

I am not say it is hard. But I find having a .c/.h pair more useful and easier to work with.

colleagueRiley 10 months ago | parent [-]

No lol

uecker 10 months ago | parent [-]

Because looking up a macro name for each library is easier than adding a c file to your makefile? You could still always do

  #include "impl.c"
and this would still be nicer than

  #define XZUGG_IMPL
  #include "impl.h"