Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1416

Re: Writing A Plain English Compiler

From "BartC" <bcas@freeuk.com>
Newsgroups comp.compilers
Subject Re: Writing A Plain English Compiler
Date 2014-11-07 11:39 +0000
Organization virginmedia.com
Message-ID <14-11-008@comp.compilers> (permalink)
References <14-11-004@comp.compilers>

Show all headers | View raw


"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]

Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Writing A Plain English Compiler "Gerry Rzeppa" <gerry.rzeppa@pobox.com> - 2014-11-04 15:50 -0600
  Re: Writing A Plain English Compiler Joshua Cranmer 🐧 <Pidgeot18@verizon.net> - 2014-11-05 00:54 -0600
    Re: Writing A Plain English Compiler "Gerry Rzeppa" <gerry.rzeppa@pobox.com> - 2014-11-06 18:52 -0600
      Re: Writing A Plain English Compiler Joshua Cranmer 🐧 <Pidgeot18@verizon.net> - 2014-11-07 22:54 -0600
        Re: Writing A Plain English Compiler "Gerry Rzeppa" <gerry.rzeppa@pobox.com> - 2014-11-08 02:41 -0600
        Re: Writing A Plain English Compiler "Gerry Rzeppa" <gerry.rzeppa@pobox.com> - 2014-11-08 03:46 -0600
          Re: Writing A Plain English Compiler "BartC" <bc@freeuk.com> - 2014-11-09 01:16 +0000
            Re: Writing A Plain English Compiler "Gerry Rzeppa" <gerry.rzeppa@pobox.com> - 2014-11-10 14:37 -0600
            Re: self-hosting, was Writing A Plain English Compiler Richard Hable <portempa@aon.at> - 2014-11-11 19:50 +0100
              Re: self-hosting, was Writing A Plain English Compiler "BartC" <bc@freeuk.com> - 2014-11-11 23:33 +0000
                Re: self-hosting, was Writing A Plain English Compiler anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-11-12 08:46 +0000
                Re: self-hosting, was Writing A Plain English Compiler "BartC" <bc@freeuk.com> - 2014-11-12 11:15 +0000
              Re: self-hosting, was Writing A Plain English Compiler anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-11-12 08:40 +0000
    Re: Writing A Plain English Compiler "BartC" <bcas@freeuk.com> - 2014-11-07 11:36 +0000
    Re: Writing A Plain English Compiler George Neuner <gneuner2@comcast.net> - 2014-11-07 16:23 -0500
      Re: Writing A Plain English Compiler Richard Hable <portempa@aon.at> - 2014-11-08 17:22 +0100
      Re: Writing A Plain English Compiler Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> - 2014-11-08 10:48 -0600
        Re: language design models, was Writing A Plain English Compiler George Neuner <gneuner2@comcast.net> - 2014-11-09 14:30 -0500
          Re: language design models, was Writing A Plain English Compiler "Gerry Rzeppa" <gerry.rzeppa@pobox.com> - 2014-11-10 03:29 -0600
          Re: Writing A Plain English Compiler Tomasz Kowaltowski <tk@ic.unicamp.br> - 2014-11-10 09:13 -0200
            Re: Writing A Plain English Compiler "Gerry Rzeppa" <gerry.rzeppa@pobox.com> - 2014-11-10 17:19 -0600
      Re: matching tasks to languages, was Writing A Plain English Compiler Gene Wirchenko <genew@telus.net> - 2014-11-10 15:37 -0800
    Re: Writing A Plain English Compiler Martin Ward <martin@gkc.org.uk> - 2014-11-10 22:56 +0000
  Re: Writing A Plain English Compiler "BartC" <bcas@freeuk.com> - 2014-11-07 11:39 +0000
    Re: Writing A Plain English Compiler "BartC" <bc@freeuk.com> - 2014-11-08 00:35 +0000
  Fundamentals for a Compiler and Language (was: Writing A Plain English Compiler) federation2005@netzero.com - 2014-12-29 13:30 -0800

csiph-web