home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!asuvax!ncar!noao!amethyst!organpipe.uug.arizona.edu!news
- From: dave@cs.arizona.edu (Dave Schaumann)
- Newsgroups: comp.programming
- Subject: Re: Teaching the basics
- Message-ID: <1992Aug21.023919.27420@organpipe.uug.arizona.edu>
- Date: 21 Aug 92 02:39:19 GMT
- References: <Bt6DGq.HuB@metropolis.com> <12635@anderson> <ratner.714247759@ficus.cs.ucla.edu> <13226@bnr-rsc.UUCP> <MHCOFFIN.92Aug20162507@tolstoy.uwaterloo.ca>
- Sender: news@organpipe.uug.arizona.edu
- Reply-To: dave@cs.arizona.edu (Dave Schaumann)
- Organization: University of Arizona
- Lines: 38
- In-Reply-To: mhcoffin@tolstoy.uwaterloo.ca (Michael Coffin)
-
- In article <MHCOFFIN.92Aug20162507@tolstoy.uwaterloo.ca>, mhcoffin@tolstoy (Michael Coffin) writes:
- >In article <13226@bnr-rsc.UUCP> sdms@bnr.ca (Andrew Sterian) writes:
- >> Hmmmm...I disagree on this one. It may have been true some years ago that
- >> the type checking etc. of Pascal made it easier on novice programmers but
- >> the latest ANSI C compilers do just as good a job of it as Pascal.
- >
- >I've heard this said with quite a bit of frequency lately, but it
- >isn't true. C compilers---even ANSI ones---don't do type
- >checking across separately compiled files. If I put the function
- >prototype
- >
- > int f(double);
- >
- >in one file and call f(3.14), the compiler is happy. If I
- >then put the function
- >
- > int f(int, char *) {... }
- >
- >in another file, the compiler won't complain about that either.
-
- Note that this is a problem only if you are careless enough not to
- put the prototype for f() in a single .h file which is then included
- in all your sources which call f().
-
- >The problem is, there isn't any enforcement of this policy.
-
- *sigh*. What do you want a compiler to do -- generate an executable, or
- be an AI conscience on how you should've written your code? Sure, having
- automated checks for consistency and reasonableness are worthwhile, but
- there's a point where the programmer has to take responsibility for his
- product.
-
- Power requires responsibility; always has, always will. If you can't
- muster the discipline languages like C require of you, the B&D languages
- are down two groups and to the left. Tell 'em "Nick" sent you.
-
- --
- Dave Schaumann dave@cs.arizona.edu
-