[antlr-interest] ITLS (was: Translators Should Use Tree Grammars)

John D. Mitchell johnm-antlr at non.net
Mon Nov 22 10:24:55 PST 2004


>>>>> "Oliver" == Oliver Zeigermann <oliver.zeigermann at gmail.com> writes:
>>>>>> <johnm-antlr at non.net> wrote:
[...]

>> * Any non-trivial program written in a general purpose programming
>> language contains ad-hoc, bug-ridden, inarticulate implementations of
>> multiple, informally-specified, incomplete languages.

> What are you referring to here: the equivalence of phrase structure
> grammars and a turing machine? If so, program and grammar are just two
> ways to look at a problem with neither of them having precedence over the
> other. So, your argument does not seem to be too convincing to me.

I'm saying that programmers, whether they understand this or not, are
*always* creating and manipulating languages when they create and modify
code.

I'm saying that general purpose programming languages (GPPLs) almost
completely miss that point and therefore the code that people write in
those GPPLs are almost always extremely poor, confusing, bug-ridden,
etc. implementations of the informally-specified (usually implicit),
horribly designed (usually accreted rather than actually designed)
languages that the programmer is creating and manipulating.


[For the "linguists" in the audience, let me humbly suggest looking at the
history and evolution of programming languages slightly differently...
There are two primary thrusts of GPPL development, mathematics (formal
logic, symbolism, abstractionism) and hardware abstraction (performance,
mechanistic, conformist).  All GPPLs are some combination of the tradeoffs
between those two (often conflicting) needs.  Given the historical lack of
hardware horsepower, it's no wonder that the hardware abstraction camp has
been so dominant.  This left the abstract, mathematics school of thought on
the mostly research fringe where they've had to watch their old ideas get
"rediscovered" (usually poorly :-) by succeeding generations of the popular
GPPLs.  Structured programming, functional programming, meta-programming,
dynamic languages, OOP, OOD, patterns, etc.  So far, that all is fairly
commonly understood.  Now, take a step to the left and look again at that
evolution in terms of how all of those approaches are about trying to get a
grip on the real languages that the programmers are trying to create and
manipulate to develop (as) their systems.]


The mainstream (of the self-styled programming avant garde, anyways :-) is
finally starting to play around in this direction.  To wit, look at all of
the work on pattern languages and domain specific languages.  Look at all
of the sudden, "revolutionary" interest in code generation and
reflection-based code manipulation.  Look at the press that folks like
Gosling got for working on a toolset based upon manipulating abstract
representations of programs.  Etc.  Heck, look at the growing buzz over the
"Language Oriented Programming" pitch by the founder of JetBrains (the
IntelliJ IDE company).

For example, look at the continuing evolution of "aspect oriented
programming" -- they are trying to backfit the ability to create and
manipulate (higher-level) languages on top of the existing GPPLs.  As their
ad hoc approach continues to run into more and more fundamental problems,
they continue to try to increase the power of their approach -- alas,
mostly through more ad hoc measures (conventions, etc.).


Hope this helps,
		John


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list