Re: What is the Simplest Programming Language?

journeyman@compilerguru.com (journeyman)
7 Jan 2003 23:35:31 -0500

          From comp.compilers

Related articles
What is the Simplest Programming Language? merosonox@yahoo.com (merosonox) (2003-01-04)
Re: What is the Simplest Programming Language? urfaust@optushome.com.au (faust) (2003-01-07)
Re: What is the Simplest Programming Language? bonzini@gnu.org (2003-01-07)
Re: What is the Simplest Programming Language? strohm@airmail.net (John R. Strohm) (2003-01-07)
Re: What is the Simplest Programming Language? alexc@world.std.com (2003-01-07)
Re: What is the Simplest Programming Language? journeyman@compilerguru.com (2003-01-07)
Re: What is the Simplest Programming Language? vmakarov@redhat.com (Vladimir Makarov) (2003-01-12)
Re: What is the Simplest Programming Language? ajo@andrew.cmu.edu (Arthur J. O'Dwyer) (2003-01-12)
Re: What is the Simplest Programming Language? eliotm@pacbell.net (Eliot Miranda) (2003-01-12)
Re: What is the Simplest Programming Language? ed_davis2@yahoo.com (2003-01-21)
| List of all articles for this month |

From: journeyman@compilerguru.com (journeyman)
Newsgroups: comp.compilers
Date: 7 Jan 2003 23:35:31 -0500
Organization: Posted via Supernews, http://www.supernews.com
References: 03-01-013
Keywords: practice
Posted-Date: 07 Jan 2003 23:35:31 EST

On 4 Jan 2003 22:46:28 -0500, merosonox <merosonox@yahoo.com> wrote:
>Other than Smalltalk, Lisp, Forth and ahem Intercal what is the most
>simple programming language to create a ((relatively) useful) compiler
>for?
>
>Which of these do you like the most?


Since you want simple, I assume you don't care about optimization, so
most of the complexity of a production compiler is eliminated right
there. If you don't mind user-hostile error recovery, use yacc/lex
(or some other compiler generator tool) and you won't have to worry
too much about syntax.


But if you want simple, I don't know how you can get much simpler than
Forth. It's got a scanner to read a word and a lookup table to find
an action to perform (okay, some actions involve mode changes, but
still not that hairy). You can even write the kernel in machine
language (hand-assembled) if you want a challenge or need to bootstrap
bare metal. The rest of Forth can be implemented in Forth.


Lisp also has a pretty simple syntax for parsing, but you have to deal
with more complex memory managment. Once you've got a kernel, you can
implement a lot of Lisp in Lisp.


These days, from the user's perspective, the complexity and utility of
a programming language is mostly in the library. How much of a
library are you willing to implement, or can you use some open source
library?


HTH,


Morris
(are bootstrapping compilers a lost art?)


Post a followup to this message

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