Re: Writing A Plain English Compiler

"BartC" <bcas@freeuk.com>
Fri, 7 Nov 2014 11:39:51 -0000

          From comp.compilers

Related articles
Writing A Plain English Compiler gerry.rzeppa@pobox.com (Gerry Rzeppa) (2014-11-04)
Re: Writing A Plain English Compiler Pidgeot18@verizon.net (=?UTF-8?Q?Joshua_Cranmer_=f0=9f=90=a7?=) (2014-11-05)
Re: Writing A Plain English Compiler gerry.rzeppa@pobox.com (Gerry Rzeppa) (2014-11-06)
Re: Writing A Plain English Compiler bcas@freeuk.com (BartC) (2014-11-07)
Re: Writing A Plain English Compiler bcas@freeuk.com (BartC) (2014-11-07)
Re: Writing A Plain English Compiler gneuner2@comcast.net (George Neuner) (2014-11-07)
Re: Writing A Plain English Compiler bc@freeuk.com (BartC) (2014-11-08)
Re: Writing A Plain English Compiler Pidgeot18@verizon.net (=?UTF-8?Q?Joshua_Cranmer_=f0=9f=90=a7?=) (2014-11-07)
Re: Writing A Plain English Compiler gerry.rzeppa@pobox.com (Gerry Rzeppa) (2014-11-08)
Re: Writing A Plain English Compiler gerry.rzeppa@pobox.com (Gerry Rzeppa) (2014-11-08)
[7 later articles]
| List of all articles for this month |

From: "BartC" <bcas@freeuk.com>
Newsgroups: comp.compilers
Date: Fri, 7 Nov 2014 11:39:51 -0000
Organization: virginmedia.com
References: 14-11-004
Keywords: design, comment
Posted-Date: 07 Nov 2014 13:20:57 EST

"Gerry Rzeppa" <gerry.rzeppa@pobox.com> wrote in message
> Having worked with a wide variety of traditional languages, and having
> written a number of compilers together, we knew that a practical
> procedural
> programming language could be concocted with just five types of
> statements:
>
> 1. Type definitions;
> 2. Global Variable definitions;
> 3. Routine Headers;
> 4. Conditional Commands; and
> 5. Unconditional Commands.


> And that, I think, is enough for now. Questions? Comments? Anyone? Anyone?
> Bueller?


I have problems with the whole approach.


For a start, anyone considering using such a language probably wouldn't be
concerned with type definitions. If it is meant to make programming simple
and accessible, then dynamic typing is expected (or more likely, someone
won't even think about that aspect; it should just work).


But then, even with a more informal language, there's only so much that can
be done, because to create sizeable programs that work reliably, I think you
need to use a more stylised and disciplined way of writing instructions. Any
free-format English would get in the way of that.


(I assume this syntax would just be a front-end to a conventional language
and conventional compiler, as your list suggests, and is not some
super-advanced AI project that can understand anything.)


Using syntax that looks like written English sounds attractive, and might be
suitable for some kinds of command-line interaction ('kill dwarf with axe'),
but I'm not sure it would be taken seriously for real programming.


Maybe, a tool can be used to translate conventional syntax into the English
style you propose, which would be fun, but I don't know if it warrants
creating a whole new language. Not if it doesn't otherwise do anything new.


--
Bartc
[Back in the 1970s there was a vogue for extensible languages, in
which you could add new syntax on the fly, by adding new BNF to the
underlying grammar. They all disappeared, because what happened was
that no two programs were written in the same langauge and nobody
could read them. Now we have OOP, where the syntax doesn't change,
but you can add lots of new types and semantics to go with them.
-John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.