Re: C Question: TypeDefing a structure ?
- From: "Alan Carre" <alan@xxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Aug 2008 05:19:36 +0700
"Doug Harrison [MVP]" <dsh@xxxxxxxx> wrote in message
news:t7f6b495v8v4aeej9fptgkjd76higof8mh@xxxxxxxxxx
On Tue, 26 Aug 2008 01:15:11 +0700, "Alan Carre" <alan@xxxxxxxxxxxxxxxxx>
wrote:
I used to do that when machines were slow and RAM limited. It cut full
build times tremendously, while not having much of an impact on partial
builds. It worked because the per-file overhead was huge, and combining
(say) 20 100-line files into one big file via #include took no longer to
compile than any one of those 20 files individually. The main problems
were
with source files that made their own private #defines, declared
functions/data static, and so forth, such that these things escaped their
usual scopes.
Yes of course. There are advantages and drawbacks as with anything.
The usual approach seems to be to namespace every module (or most of it) so
you get the benefits of statics even though the functions/objects are
actually global to every routine/object in the lib. You don't wind up with
variable/function-name conflicts and neither does the user of the lib.
Of course that option wasn't available in pure C, 10 years ago ;)
- Alan
.
- Follow-Ups:
- Re: C Question: TypeDefing a structure ?
- From: Doug Harrison [MVP]
- Re: C Question: TypeDefing a structure ?
- References:
- C Question: TypeDefing a structure ?
- From: Robby
- Re: C Question: TypeDefing a structure ?
- From: Alan Carre
- Re: C Question: TypeDefing a structure ?
- From: Doug Harrison [MVP]
- C Question: TypeDefing a structure ?
- Prev by Date: Re: Heap memory available (W32 console app in Visual C++)
- Next by Date: Re: WCHAR conversion problem
- Previous by thread: Re: C Question: TypeDefing a structure ?
- Next by thread: Re: C Question: TypeDefing a structure ?
- Index(es):
Relevant Pages
|