Path: utzoo!mnetor!uunet!husc6!cca!g-rh From: g-rh@cca.CCA.COM (Richard Harter) Newsgroups: comp.lang.misc Subject: Re: Perfect language features: how many languages? Message-ID: <24112@cca.CCA.COM> Date: 7 Feb 88 05:44:54 GMT References: <3928@ames.arpa> <2400001@otter.HP.COM> <960@ssc-bee.ssc-vax.UUCP> <10407@mimsy.UUCP> <4930@watdragon.waterloo.edu> <1535@uoregon.UUCP> <5015@watdragon.waterloo.edu> Reply-To: g-rh@CCA.CCA.COM.UUCP (Richard Harter) Organization: Computer Corp. of America, Cambridge, MA Lines: 45 Summary: Computer 'languages' aren't languages In article <5015@watdragon.waterloo.edu> djsalomon@watdragon.waterloo.edu (Daniel J. Salomon) writes: > >An analogy with natural languages would be a better one... Permit me to intrude with a point here. Computer languages are not languages in the sense that natural languages are languages. Computer 'languages' are really more like recipes for languages. If you look at a natural language such as English, you see that it has a grammar, certain rules of usage and style, etc. You also see a dictionary with thousands of defined words. When I use a natural language I may have to create a special term now and then, but, for the most part I use the same vocabulary that every one else uses. Computer 'languages' are like natural languages with all of the vocabulary stripped out, except for those few words needed to implement the grammar. When one writes a computer program one spends a fair bit of time simply defining the terms that will be used in the program. Each program is a separate language. If people used natural languages the way they use computer languages, any time some wanted to write a book they would first have to write the dictionary to be used in the book. One can envision the following scheme. Language X comes with both a grammar and a dictionary. The dictionary has a large number of things defined in it with complete definitions. For a simple example, i might be defined as an integer used as an index with scope restricted to the block that it is in. Programs in language X have no declarations at all. The compiler for language X does not build a symbol table -- it takes its symbol table from the dictionary. [Naturally there would be provisions for extending the dictionary and for adding additional special purpose dictionaries.] The interesting thing about language X is that all of the programs written in language X share the same vocabulary. In the current fashion in computer languages, each program has its own vocabulary, except insofar as usage is repeated from one program to the next. It does remind one of the tower of Babel, doesn't. This might be a good thing to do. -- In the fields of Hell where the grass grows high Are the graves of dreams allowed to die. Richard Harter, SMDS Inc.