Re: Java compiler courses

glen herrmannsfeldt <gah@ugcs.caltech.edu>
23 Apr 2007 07:49:43 -0400

          From comp.compilers

Related articles
Java compiler courses wookiz@hotmail.com (wooks) (2007-04-20)
Re: Java compiler courses rjshaw@netspace.net.au (Russell Shaw) (2007-04-23)
Re: Java compiler courses ajohnson@mathworks.com (Andy Johnson) (2007-04-23)
Re: Java compiler courses gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-04-23)
Re: Java compiler courses DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-04-23)
Re: Java compiler courses chris.dollin@hp.com (Chris Dollin) (2007-04-23)
Re: Java compiler courses 148f3wg02@sneakemail.com (Karsten Nyblad) (2007-04-25)
Re: Java compiler courses wookiz@hotmail.com (wooks) (2007-04-25)
Re: Java compiler courses DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-04-25)
Re: Java compiler courses torbenm@app-7.diku.dk (2007-04-26)
[14 later articles]
| List of all articles for this month |

From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: 23 Apr 2007 07:49:43 -0400
Organization: Compilers Central
References: 07-04-074
Keywords: Java, courses

wooks wrote:
> Why do they exist.


> Why would anybody want to teach a compiler course in Java when it
> seems that there are more and better resources (books, tools)
> supporting a compilers course based on C (aside from the obvious -
> students are taught Java and not C).


Well, first, Java compilers are likely to be written in Java,
following the tradition of writing compilers in the language
that they compile.


> Why would anybody want to write a compiler in Java (unless it's the
> only language they know).


Java has much better support for string handling than C does. It is
likely slower, but that isn't always a limitation for a compiler.
Computers are now fast enough, and with JIT java is usually
pretty fast. Debugging mistakes in string handling in C,
such as overrunning the end of a string, is not easy. Java
checks string bounds, simplifying debugging.


Now, why would anyone want to write a compiler in C?


-- glen



Post a followup to this message

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