home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!dog.ee.lbl.gov!news!cod!sampson
- From: sampson@nosc.mil (Charles H. Sampson)
- Subject: No NULL Statement
- Message-ID: <1992Dec16.184220.2867@nosc.mil>
- Organization: Computer Sciences Corporation
- References: <1992Dec15.203558.18211@inmet.camb.inmet.com> <EACHUS.92Dec15202249@oddjob.mitre.org> <1992Dec16.172717.19807@wdl.loral.com>
- Date: Wed, 16 Dec 1992 18:42:20 GMT
- Lines: 23
-
- In article <1992Dec15.203558.18211@inmet.camb.inmet.com> stt@spock.camb.inmet.com (Tucker Taft) writes:
- >
- > In retrospect, one could argue that it would have been better
- > to have no "null" statement at all (other than simply ";") than
- > to create a situation allowing this kind [example deleted] of
- > one word error.
-
- The problem being discussed was a result of the overloading of
- NULL in Ada. IMO, there's too much overloading of reserved words in
- Ada in an effort to minimize the number of reserved words. (For those
- who don't know, keeping the number of reserved words down was a design
- requirement.) However, denoting a null statement by the absense of a
- statement is not the way to go, as Mike Feldman's example from C illus-
- trates. I worked for many years in another language that also had this
- "feature". I was amazing how many times the statement controlled by
- an IF would vanish by the careless insertion of an unneeded statement
- terminator. The associated debugging problems were severe.
-
- Furthermore, an explicit null statement clearly says, "At this point,
- do nothing." For those of us who believe in readability, this is impor-
- tant.
-
- Charlie
-