Re: Incomplete compiler?

tfb@apocalypse.OCF.Berkeley.EDU (Thomas F. Burdick)
4 May 2002 14:17:59 -0400

          From comp.compilers

Related articles
Incomplete compiler? Uwe.Uta.Altenburg@t-online.de (Uwe Altenburg) (2002-04-24)
Re: Incomplete compiler? haberg@matematik.su.se (2002-04-29)
Re: Incomplete compiler? haberg@matematik.su.se (2002-05-01)
Re: Incomplete compiler? bernhard@cs.waikato.ac.nz (Bernhard Pfahringer) (2002-05-01)
Re: Incomplete compiler? haberg@matematik.su.se (2002-05-03)
Re: Incomplete compiler? Martin.Ward@durham.ac.uk (2002-05-03)
Re: Incomplete compiler? idbaxter@semdesigns.com (Ira D. Baxter) (2002-05-03)
Re: Incomplete compiler? tfb@apocalypse.OCF.Berkeley.EDU (2002-05-04)
Re: Incomplete compiler? haberg@matematik.su.se (2002-05-04)
| List of all articles for this month |
From: tfb@apocalypse.OCF.Berkeley.EDU (Thomas F. Burdick)
Newsgroups: comp.compilers
Date: 4 May 2002 14:17:59 -0400
Organization: University of California, Berkeley
References: 02-05-013
Keywords: syntax, design
Posted-Date: 04 May 2002 14:17:59 EDT

Martin.Ward@durham.ac.uk (Martin Ward) writes:


> > [More function names are fine, you can do that without adding random new
> > syntax. The 1970s extensible languages let you define, say, your own
> > mutant case statement which was just awful. -John]


Hmm, were you counting Lisp and Smalltalk as "just awful"? Because I
use Lisp, and while I don't doubt that people can do horrid things
with the ability to extend syntax, you can also do wonderful things.
If you want to keep some sort of discipline (say, about resource
management, or consistency in a graph your program is modifying),
writing a high-level syntax that maintains that discipline for you is
a big win. It saves you a lot of typing, which helps avoid
cut-and-paste mistakes, but it also refactors that decision into a
single place, so you can revisit it later.


> Perl's "code block" syntax means that you can introduce new "keywords"
> into the language (including mutant case statements). How does perl
> get away with this where previous extensible languages failed?


  [...]


> [I know that it's possible to fake up new syntax in perl using code
> blocks, but I don't know of anyone who does. We like the existing
> line-noise-like syntax just fine. But you're certainly right that a
> set of common libraries makes life a lot easier, both for people who
> write programs and for people who have to read them. -John]


I worked at a shop where it was done all the time. You certainly
*don't* write up a new mutant case syntax, because you leave problems
alone if the language has already solved them. But for problems where
you'd otherwise be hand-expanding things inline all the time, it's
great.


Post a followup to this message

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