Re: why teach about compilers, was Java compiler courses

Chris Smith <cdsmith@twu.net>
4 May 2007 13:20:20 -0400

          From comp.compilers

Related articles
Java compiler courses wookiz@hotmail.com (wooks) (2007-04-20)
Re: Java compiler courses 148f3wg02@sneakemail.com (Karsten Nyblad) (2007-04-25)
Re: Java compiler courses gneuner2@comcast.net (George Neuner) (2007-04-26)
Re: why teach about compilers, was Java compiler courses 148f3wg02@sneakemail.com (Karsten Nyblad) (2007-04-29)
Re: why teach about compilers, was Java compiler courses gneuner2@comcast.net (George Neuner) (2007-04-29)
Re: why teach about compilers, was Java compiler courses bobduff@shell01.TheWorld.com (Robert A Duff) (2007-04-29)
Re: why teach about compilers, was Java compiler courses danwang74@gmail.com (Daniel C. Wang) (2007-05-04)
Re: why teach about compilers, was Java compiler courses cdsmith@twu.net (Chris Smith) (2007-05-04)
Re: why teach about compilers, was Java compiler courses gneuner2@comcast.net (George Neuner) (2007-05-04)
Re: why teach about compilers, was Java compiler courses torbenm@app-7.diku.dk (2007-05-07)
Re: why teach about compilers, was Java compiler courses torbenm@app-7.diku.dk (2007-05-07)
Re: why teach about compilers, was Java compiler courses stevem@ans.com.au (Steve Murray) (2007-05-09)
Re: why teach about compilers, was Java compiler courses danwang74@gmail.com (Daniel C. Wang) (2007-05-10)
| List of all articles for this month |

From: Chris Smith <cdsmith@twu.net>
Newsgroups: comp.compilers
Date: 4 May 2007 13:20:20 -0400
Organization: Altopia Corp. - Usenet Access - www.altopia.com
References: 07-04-074 07-04-098 07-04-120 07-04-149 07-04-153 07-04-155
Keywords: courses
Posted-Date: 04 May 2007 13:20:19 EDT

Robert A Duff <bobduff@shell01.TheWorld.com> wrote:
> By the way, if I were teaching a compiler course, I would use OCaml or
> Ada, neither of which is perfect. I would not use C or C++, and
> probably not Java. As others have said, the goal is to teach general
> principles about compilers, not to waste time fooling about with
> low-level debugging.


What I'm wondering is: assuming that compilers is being taught to
students in their third or fourth year of a CS degree program, why
would one pick a language? Wouldn't one simply give them a project
and let them decide how to do it? Since everyone is in such agreement
that the goal should be to teach general concepts and not low-level
programming details, why is there this inexplicable consensus that one
has to pick a programming language?


I took a compilers course that didn't specify a language. I wrote a
compiler in Haskell; others used C, Java, C#, VB, or whatever. I seem
to recall that one poor soul decided to use Perl, but he made his own
choice and he got things done in the end. The course I took also
banned third-party code generator tools; I guess if you needed to
teach some specific lex/yacc-ish products, that would be a reason to
pick a language. If you teach the algorithms, though, they are
largely independent of language.


--
Chris Smith
[A few years back when I was taking my first compiler course, the assignment
was to compile some subset of APL into Basic. Everyone else wrote their
compiler in APL, I wrote mine in Trac, and as I recall, mine was the only
one that ever generated a working translation. -John]



Post a followup to this message

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