I am developing a C ++ library. This made me think about how to handle Java and C #, including various library components. For example, Java uses βimportsβ to allow the use of classes from other packages, and C # simply uses βusesβ to import entire modules.
My questions: would it be a good idea # to include everything in the library in one massive include, and then just use the using directive to import certain classes and modules? Or will it just be crazy?
EDIT:
Good answers so far, here are a few mitigating factors that I feel adding to this idea:
1) The internal #includes are contained as usual (short and dots)
2) A file that includes everything is supplied with the library for those who want to use it. 3) . You can optionally make a large include file part of a precompiled header
source
share