Subject: Re: strict typechecking on kernel compiles
To: None <>
From: Niklas Hallqvist <>
List: current-users
Date: 07/23/1995 20:43:34
>>>>> "Jonathan" == Jonathan Stone <> writes:

>> Without a polymorphic language, you can't get strong typechecking
>> out of a polymorphic interface.  Fortunately C has an escape
>> (specifically,
Jonathan> .stdarg functions) for polymorphic functions, so we can
Jonathan> prototype them
>> even though we can't get real typechecking.

Jonathan> Seriously: why *bother* prototyping these functions, then?
Jonathan> Is it just an escape to get through a `strong typing' tool?
Jonathan> I really don't see that a prototype that says ``anything
Jonathan> allowed'' buys _anything_.

Well, you get some sort of type checking on the N first args.  I have
got errors like fprintf ("%d", x) caught by using prototpes.

Jonathan> It's also the case that using the ellipsis in a prototype
Jonathan> can result in a less-efficient argument-passing sequence at
Jonathan> run-time, on some architectures.

Does this mean *not* using prototypes at all would be more efficient?
I thought it to mean an implied ellipsis were there.  Isn't it so?


Niklas Hallqvist	Phone: +46-(0)31-40 75 00
Applitron Datasystem	Fax:   +46-(0)31-83 39 50
Molndalsvagen 95	Email:
S-412 63  GOTEBORG	WWW:   Here