Re: Java compiler courses

George Neuner <>
26 Apr 2007 09:43:21 -0400

          From comp.compilers

Related articles
[5 earlier articles]
Re: Java compiler courses (Chris Dollin) (2007-04-23)
Re: Java compiler courses (Karsten Nyblad) (2007-04-25)
Re: Java compiler courses (wooks) (2007-04-25)
Re: Java compiler courses (Hans-Peter Diettrich) (2007-04-25)
Re: Java compiler courses (2007-04-26)
Re: Java compiler courses (Michael Klemm) (2007-04-26)
Re: Java compiler courses (George Neuner) (2007-04-26)
Re: Java compiler courses (glen herrmannsfeldt) (2007-04-26)
Re: Java compiler courses (Chris F Clark) (2007-04-26)
Re: Java compiler courses (Hans-Peter Diettrich) (2007-04-27)
Re: Java compiler courses (Hans-Peter Diettrich) (2007-04-27)
Re: Java compiler courses (George Neuner) (2007-04-28)
Re: Java compiler courses (Hans-Peter Diettrich) (2007-04-29)
[16 later articles]
| List of all articles for this month |

From: George Neuner <>
Newsgroups: comp.compilers
Date: 26 Apr 2007 09:43:21 -0400
Organization: Compilers Central
References: 07-04-074 07-04-098
Keywords: Java, symbols
Posted-Date: 26 Apr 2007 09:43:21 EDT

On 25 Apr 2007 04:14:58 -0400, Karsten Nyblad
<> wrote:

>Most of the students on are never going to write a compiler. They are
>studying the subject for two purposes:
>First because they want to know how their code is transformed into
>machine code such that they can better predict how some piece of code
>will work. Who cares what language the compiler is written in in
>that case?

I'm willing to bet that few people would take a course in compilers
for that particular reason. It is so well known that code generation
is implementation dependent that anyone can learn that much simply by
lurking in her favorite programming newsgroup. The stock reply to
such an inquiry is to turn on assembler listings, try different things
and compare the results.

Some people cross over to compilers from other areas, but with few
exceptions I think the only people who really study compiler
technologies are those interested in language theory or design and

>Secondly because lots of computer programs read text files. You can use
>the theory for front ends when writing code to read such text files.
>Such readers will typically be written in same the language as the rest
>of the project. Thus there is no particular reason to believe that the
>students later in will use their knowledge in projects using C.
>Finally, a curse on on compiler design should not be a curse on
>debugging code or data structures. There is no reason why students
>should fight memory leaks in C code or reimplement stacks, maps, etc.,
>when they can use library functions in other languages. The students
>have only so much time for their student projects, and there is a lot of
>compiler theory they will not have time for trying in practice.

I think both of those objections are wrong.

Like it or not, programming skills are an integral part of a CS
education. We can debate endlessly what are appropriate teaching
languages, but in the end the students must somehow get practical
programming experience to gain certain skills and master certain
concepts. You can argue that the student may never again use those
languages, but you can't reasonably argue that she will never design
or write software or manage people who do - that's the whole point of
her education. Most of the skills are portable to any environment the
student may find herself in later. Debugging is a skill for life, not
just for programming.

To that end, compilers are complex programs that intersect many skill
areas. A professional developer will certainly need to successfully
read and write files, parse input, format output, manipulate complex
data structures, manage resources, plan strategy and schedule
operations. Even a simple compiler touches on all of these things.
Certainly, the student should be able to use any facility of the
implementation language to help herself - but debugging comes with the

Moreover, compiler courses are not "Intro to Programming" courses ...
they have many prerequisites and are typically not offered before the
3rd year. Students taking such courses are expected to already have
good working knowledge of the implementation language(s) used
(learning a few tools like Bison/Flex should take a few days at most).
And in a good program it would be a full year course or a semester
each on front/IR and IR/back, allowing the student plenty of time to
implement and integrate parts for a significant project.

The student's ability to design and implement a halfway decent
compiler for a reasonable language is a practical test of the CS
program's ability to impart concepts and skills. A compiler is one of
a handful of senior level projects I can think of that does encompass
virtually everything the CS program is supposed to teach.


Post a followup to this message

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