At 03:31 AM 5/19/2001 +0100, Simon Cozens wrote:
>On Fri, May 18, 2001 at 06:29:11PM -0700, Daniel S. Wilkerson wrote:
> > Therefore, if it isn't a back-end and it isn't a front-end, what is it?!
>
>Both!

It's a dessert topping *and* a floor wax!

> > Can someone say what it is?
>
>It's true that perl6 the interpreter will be able to read various different
>types of input, rather like GCC. (since GCC can also parse and compile C++,
>Objective C and, with a little nudging, Fortran)

This is pretty much true of all the compiler suites these days. If a vendor 
has compilers for multiple languages, odds are they all share a common back 
end. GCC does as Simon's mentioned, but Digital's (sorry, Compaq's) 
compiler suites (for the VAX and Alpha) are the same, as is Microsoft's 
Visual suite of languages. I think Sun's compilers are the same, as are 
Intel's.

This is less surprising than you might think. Once you get past the trivial 
syntactic differences, almost all the languages you'll see a compiler for 
these days are close to identical, barring the odd bell or whistle. C, C++, 
Ada, Fortran, COBOL, PL/I, Modula-x, Pascal, Basic--they're all essentially 
identical, at least as far as the compiler writer's concerned. (Things get 
a little odd with RPN languages like PostScript or Forth, or Lisp-ish 
things, but those are really niche languages)

When you get right down to it, regardless of the source language, the 
hardware is going to stay the same. That's what the back-end of a compiler 
is concerned with--emitting the most efficient sequence of back-end 
instructions it can manage. Having a common back end makes it a lot easier 
to concentrate your efforts into optimizing that one back end.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to