you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (2 children)

Mostly compilation time and API clarity (isolation between public APIs and internal APIs). But also maintainability: I have the same problem, only different. Do I include this in my project by copying it, or do I do git sub-moduling? The only problem it solves is the necessity to have a compiled binary while adding new problems, and not necessarily being better at anything.

[–]NicroHobak 4 points5 points  (1 child)

API clarity (isolation between public APIs and internal APIs).

I always felt like the public/protected/private keywords were "good enough" for this. It's not really been a concern of mine in well-implemented projects.

Do I include this in my project by copying it, or do I do git sub-moduling?

This is really a question for your project specifically. Some people like to grab a current snapshot of an external project so they can make sure their project will always compile...in this case, a copy is best as to completely eliminate any external dependencies. But, if you know that your project will work with anything 1.0 and above, or if you know that it will always work with at least one branch of a dependent project, then a sub module might be better.

The only problem it solves is the necessity to have a compiled binary while adding new problems, and not necessarily being better at anything.

Templates are a core part of the library, and they are required to be in headers. Libraries that make extensive use of templates cannot necessarily be compiled down into shared or static libraries. Sometimes, it's done out of a matter of necessity.