[TUHS] origin of C header files
Clem Cole
clemc at ccc.com
Sat Dec 30 06:31:54 AEST 2017
On Fri, Dec 29, 2017 at 2:28 PM, Paul Winalski <paul.winalski at gmail.com>
wrote:
>
> When higher-level languages came along, programmers moving from
> assembly code to a HLL would want the same sort of preprocessor
> functionality. I know that IBM PL/I had %include, and I suspect that
> other HLLs of the day had similar features.
>
> What's very clear is that C did not invent include files or
> conditional compilation, it merely carried on existing tradition.
>
I'll +1 Paul's comment and add a couple of observations. Languages such
a PL/1 and FORTRAN would could support a preprocessor and conditional
compilation, were more easy to use to build 'products' - as opposed to
Pascal. Folks did splice an backwards conditional compiling scheme with
include files into some Pascal flavors but it was non-standard.
Fortran folks used tools like RATFOR or m4, but the key was the there was
some why to preprocess code for different targets. In a production shop,
particularly where your 'target' customer was different, this ability
becomes more and more of an requirement.
I've always said as contemporary production systems programming languages,
while BLISS had a better Macro system then C, the include file and
conditional scheme worked much better/was much cleaner - to the point that
ifdef is abused and the cause of much pain in actual code. But the truth
is that is a success problem. When used properly, the C header scheme,
while not invented by the BTL crew, was pretty much what people needed.
No too fancy, but all the features you really needed and has been lasting.
Clem
ᐧ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20171229/131b2211/attachment.html>
More information about the TUHS
mailing list