From: | Hans-Peter Diettrich <DrDiettrich1@aol.com> |
Newsgroups: | comp.compilers |
Date: | Thu, 19 Apr 2012 14:20:11 +0200 |
Organization: | Compilers Central |
References: | 12-04-019 12-04-027 |
Keywords: | books |
Posted-Date: | 19 Apr 2012 23:12:55 EDT |
glen herrmannsfeldt schrieb:
> C is a nice, simple language in which to describe compiler design, and
> also not so bad a language in which to write compilers. Given that,
> it isn't a bad start toward writing one for another language, and/or
> written in another language, unless you don't know C.
<rant from the hate-C fraction>
C is an ugly language, featured (and widely used) to write cryptic code.
In practice it's useless without another language, used in the
preprocessor (and more languages used in "make" and the autobloat
tools). Even an inventor of that language acknowleged later, that he
better should have followed Wirth's advice, to e.g. make the language
LL(1). The strength of C is writing low level (OS) code, but it lacks
many features desireable in *managing* (such) big applications. This
issue has been addressed in C++, C# and Java, later, but who would
advice an newbie to implement an compiler for C++, which IMO also is
everything but a "nice" or easily understandable language?
But of course you are right in so far, that a C/C++ compiler is one of
the best examples, where one can study much required theory, which is
not required for writing compilers for better designed languages.
</rant>
Just my $0.02 ;-)
DoDi
Return to the
comp.compilers page.
Search the
comp.compilers archives again.