Re: signature analysis ( was: getargs enhancement )

Gerry Stringer (gerry@camscan.co.uk)
Wed, 9 Mar 94 16:00:19 GMT

>>Jack Jansen:

>>I would like type checking only if it buys me something. The main
>>thing it could get me, maybe, is more efficient implementation.
>>...

To me (static type checking) is a lot more than just the efficiency
thing - on quite a number of occasions I've had bugs because I haven't
converted a string to an a number or vice-versa (the latest was
comparing a userid as text with the int that came back from doing a
pwd.getpwnam call)

The difficulty comes in developing large quantities of code - you need
to test far more thoroughly to avoid runtime errors than if your C/C++
compiler found the sillies for you.

Failing static type checking, I would still like to see an easy way of
specifying dynamic type checks in functions/methods so that at least some
'firewalls' are put up. This can either be in the arglist
specification or else by some precondition/assert type of mechanism. I
guess there might need to be the option to turn them off for speed?

Lots of other languages have this problem so I suppose it's just a
question of getting used to it and putting some of the speed of
development time savings into better testing!

gerry

+--------------------------------+---------------------------------+
|Gerry Stringer |Phone: +44 954 780926 |
|Cambridge Scanning Company Ltd |Fax: +44 954 789829 |
|Saxon Way |UUCP : gerry@camscan.co.uk |
|Bar Hill | gerry@camscan.uucp |
|Cambridge CB3 8SL | |
|United Kingdom | |
+--------------------------------+---------------------------------+