Sujet : Re: #include
De : rjh (at) *nospam* cpax.org.uk (Richard Heathfield)
Groupes : comp.theoryDate : 23. Mar 2025, 12:11:56
Autres entêtes
Organisation : Fix this later
Message-ID : <vroq9s$23o7q$4@dont-email.me>
References : 1 2 3 4
User-Agent : Mozilla Thunderbird
On 23/03/2025 11:08, Richard Damon wrote:
On 3/23/25 5:15 AM, Richard Heathfield wrote:
On 23/03/2025 08:54, Mikko wrote:
>
<snip>
>
Some languages use include to compensate the lack of some
better features for the same purpose. languages that have
those better features don't need include and usually haven't.
>
If I were a Ritchie (pace, Tevye, there is no music), the VERY FIRST TIME a compilation failed because I forgot a header I'd have merged all the headers into one and then hardcoded that one everything.h header into the compiler itself. Problem... SOLVED.
>
Doesn't work for user includes.
Indeed. But if it works for stdio, stdlib, string, math, ctype and assert, it works all the work it has to.
Yes, we could have the compiler auto include all the standard headers, but then we lose the ability to improve the backwards compatibility of standards that require the inclusion of a new header to enable new nice symbols for new features that used to be available to the user to use.
I'll take the hit. :-)
-- Richard HeathfieldEmail: rjh at cpax dot org dot uk"Usenet is a strange place" - dmr 29 July 1999Sig line 4 vacant - apply within