Actually you'd be wrong.

The first interpreter that I know of for the first interpreted language (a dialect of Lisp) was first written in itself. And then that program was hand-translated to assembly. (The person who wrote the interpreter did not intend to see it ever run!)

Likewise C compilers like gcc are frequently written in C. To develop a compiler for a new hardware platform you modify an existing compiler to understand the necessary assembly language, then you compile a C compiler for the new platform.

The Squeak interpreter (Squeak is a type of Smalltalk) demonstrates an interesting variation of this strategy. Squeak is written in Squeak. But it comes with a program that can compile itself to a C++ program which, when run, recreates the original Squeak image.

As all of these examples show, it is often nice to write a language in the language that you're writing. Once you have it written, actually making it run requires some bootstrapping, but the bootstrapping process is usually much easier than writing your full program from scratch.

This is doubly true if you want to wind up with a language (like Perl 6) where you want to end up with a lot of hooks within the language to be able to manipulate the language behaviour. If you bootstrap then you don't have to draw so many fairly arbitrary internal distinctions between when you're looking at user-changed behaviour and native built-in behaviour.


In reply to Re^4: Open season on official Perl 6 grammar by tilly
in thread Open season on official Perl 6 grammar by kelan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.