[net.lang.c] C a strongly typed language?

g-frank@gumby.UUCP (02/06/85)

   I've had so much response to my assertion that most people don't use
lint that I must admit that, yes, a large number of people do (this in
spite of a recent anti-lint flame on the net that provoked even stronger
response).

   This all raises another question though.  The folks defending lint to
above-mentioned flamer describe the need to perform various contortions
to satisfy lint's extreme pickiness:  casting function returns to (void),
explicitly casting function arguments to (char *), or (int *), or whatever,
putting in little commands to lint to ignore this or that, etc.  None of
this is any reason to flame at lint, of course.  As it has been pointed
out, if you want portable code in C, you use lint.  One defender of the
thing even called C a "strongly typed language."

   It looks like I've been wrong about a large class of C programmers.
These folks LOVE strong typing.  They love it so much that they will
put up with casting function call arguments because the language they
are working in doesn't know enough about function types to do a proper
NIL constant conversion.  They hold it in such esteem that they will
put up with having to pass the entirety of their code through some extra
program in addition to their compiler.  I mean, these folks are not only
willing to declare their faith, they go out of their way to SUFFER for
it.  I'm, like, awed.

   Originally, I thought C programmers didn't like Modula-2 because the
strong typing was inconvenient.  Now I understand better.  Modula-2 doesn't
make you work hard enough to achieve strong typing.  Guess I'm just a
lazy guy.


-- 
      Dan Frank

	"good news is just life's way of keeping you off balance."

robert@gitpyr.UUCP (Robert Viduya) (02/10/85)

><

Posted from  g-frank@gumby.UUCP
> 
>    It looks like I've been wrong about a large class of C programmers.
> These folks LOVE strong typing.  They love it so much that they will
> put up with casting function call arguments because the language they
> are working in doesn't know enough about function types to do a proper
> NIL constant conversion.  They hold it in such esteem that they will
> put up with having to pass the entirety of their code through some extra
> program in addition to their compiler.  I mean, these folks are not only
> willing to declare their faith, they go out of their way to SUFFER for
> it.  I'm, like, awed.
> 

I wouldn't call lint an extra program in addition to the compiler.  I would
say it's a part of the compiler.  If you put lint and cc together you have
what most people consider a compiler.  All the other compilers I've worked
with (Pascal, Fortran, PL/I and others) do everything that lint and cc
put together do (especially Pascal).  Lint and cc merely seperated the tasks
performed by the compiler: that of program verification/checking and producing
code.  Granted, lint does do a bit more such as portability checking (although
there are some compilers that do check that) and also cc does has to do some
syntax checking.  As a personal opinion, my main gripe about all these C
compilers popping up all over the place for non-unix systems is that most
of them do not come with lint.

As for suffering through using lint, I'd say it wasn't suffering, but more
like a slight-but-necessary inconvenience.  The suffering part is when lint
isn't used.

					robert
-- 
Robert Viduya
Georgia Institute of Technology

...!{akgua,allegra,amd,hplabs,ihnp4,masscomp,ut-ngp}!gatech!gitpyr!robert
...!{rlgvax,sb1,uf-cgrl,unmvax,ut-sally}!gatech!gitpyr!robert