Re: self-hosting, was Writing A Plain English Compiler

anton@mips.complang.tuwien.ac.at (Anton Ertl)
Wed, 12 Nov 2014 08:40:16 GMT

          From comp.compilers

Related articles
[2 earlier articles]
Re: Writing A Plain English Compiler gerry.rzeppa@pobox.com (Gerry Rzeppa) (2014-11-06)
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 bc@freeuk.com (BartC) (2014-11-09)
Re: self-hosting, was Writing A Plain English Compiler portempa@aon.at (Richard Hable) (2014-11-11)
Re: self-hosting, was Writing A Plain English Compiler bc@freeuk.com (BartC) (2014-11-11)
Re: self-hosting, was Writing A Plain English Compiler anton@mips.complang.tuwien.ac.at (2014-11-12)
Re: self-hosting, was Writing A Plain English Compiler anton@mips.complang.tuwien.ac.at (2014-11-12)
Re: self-hosting, was Writing A Plain English Compiler bc@freeuk.com (BartC) (2014-11-12)
| List of all articles for this month |
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.compilers
Date: Wed, 12 Nov 2014 08:40:16 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
References: 14-11-004 14-11-005 14-11-007 14-11-014 14-11-016 14-11-020 14-11-028
Keywords: debug, practice
Posted-Date: 12 Nov 2014 04:06:22 EST

Richard Hable <portempa@aon.at> writes:
>On 11/09/14 02:16, BartC wrote:
>
>> Self-hosting (implementing a language in itself) is a nice touch, but
>> I don't think it's that important, perhaps because people are
>> realising that the best language to implement a compiler in, is not
>> necessarily the language that is being compiled. Unless of course you
>> are trying to use a single language for everything.)
>
>I think, the main advantage of self-hosting is that it can be used as
>one big unit test: you can compile the compiler with itself, use the
>resulting compiler to compile itself again, and check if the result is
>exactly the same.


Yes, having additional testing for your compiler is one advantage
(although I would not call it a unit test).


Another reason to self-host a compiler is the signal it sends: If you
claim that your language is general-purpose, and you write the
compiler for it in a different language, you are obviously not very
convinced of the capabilities of your language, so why should anybody
else use it?


- anton
--
M. Anton Ertl
anton@mips.complang.tuwien.ac.at
http://www.complang.tuwien.ac.at/anton/


Post a followup to this message

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