Tag Info

New answers tagged


Header file as a pure interface works more or less fine with classes. As soon as templates come into picture, this model stops working whatsoever. Templates are not compilable, and the whole template implementation must appear in the header.


It's not a bad mental model to use as a guide but unfortunately for historical / technical reasons C++ headers conflate interface and implementation in ways that this simple mental model doesn't fully capture. In order to make good physical design decisions when things get a little more complex, it is generally necessary to understand the way headers work ...


Pretty much, there's little difference between a header file and an interface as used by other languages for the main part. Obviously though there are differences in implementation in that the header will also contain private information, but fundamentally they are used to describe the features the class or module will provide. In a way then, its also a ...


The points that look ugly to me: Why not a Version Control System? Keeping versions on the local file system is not pretty. You can use versioning systems and add 3rd party javascript/css libraries too so added/removed/replaced javascript and css files will be trackable. You go go back or forth between revisions and check the differences easily. It is hard ...

Top 50 recent answers are included