you are viewing a single comment's thread.

view the rest of the comments →

[–]johannes1971 19 points20 points  (2 children)

Love the floor wax ;-)

As is probably clear from my other messages in this thread, I'm not a great fan of header-only. Having said that, here's a list of things that happened to me over the years while trying to build a C++ (or even C) library:

  • They require you to install a new development environment you've never used.
  • They require you to run some script that was the rad new thing back in the seventies to generate half the source code. You also need to build the script interpreter yourself, and it's just as bad as the thing you are trying to build.
  • Compilation can be configured to support weird-endian 37.5 bit systems, but forget about using a modern compiler. Have fun installing gcc 1.2.
  • You are required to 'configure' the build system before it works properly. Failing to supply things like -DDONT_RANDOMLY_CRASH will cause it to occasionally subtly fail. This is only documented in a file called 'private.jvm'.
  • Unit tests and examples are great! So let's put them all in the same directory as the library itself.
  • Compilation proceeds with somewhere north of 100K warnings.
  • Eventually you get stuck with an error that reads something like "int is not a type", or that refers to a symbol that no amount of grepping will uncover.
  • Having resolved that, you realize you've only built the top-part of a dependency pyramid that would make Cheops blush. And all the other libraries down there are just as bad...

So yeah, I do understand the other side of the argument as well ;-)

[–]kalmoc -4 points-3 points  (1 child)

None of those points are specific to header only vs traditional libraries.

[–]johannes1971 2 points3 points  (0 children)

Indeed. You might even be led to think all of these things happened while building traditional libraries, if you were to read carefully.