FYI, Monty, I am in the process of quitting smoking....day 12 of being
smoke-free now...
So, if I came across as a bit harsh, sorry, I'm angry at the leaves on
the trees... :)
Cheers,
Jay
Michael Widenius wrote:
> Hi!
>
>>>>>> "Mats" == Mats Kindahl <mats@stripped> writes:
>
> <cut>
>
>>> The benefit of this is:
>>> - Easier to decide what to include
>>> - Faster compile time for all compilers
>>> - MUCH faster compile time for compilers that support precompiled
>>> headers.
>>> - Easier to handle header files with conditionals as you are less
>>> likely to include these before all the required definitions are
>>> defined.
>
> Mats> I think a coding policy that optimizes for minimization of includes and
> compile
> Mats> speed is not focusing on the right things.
>
> Actually, it also gives you fewer errors and makes it easier to start
> coding a new project file (this is from experience with the MySQL projects)
>
> Mats> Also, for the current code, deciding what to include is not very easy since
> Mats> header files are dependent on other header files being included before they
> are
> Mats> included.
>
> In most cases, one only have to include a few files (in many cases
> just one) and there is lost of examples, so this isn't a big thing.
>
> Allowing things to be included in any order, will force you to have
> massive include directives in the include files and is an even worse
> practice and harder to maintain.
>
> Regards,
> Monty
>