[comp.compilers] Multi-paradigm languages

budd@mist.CS.ORST.EDU (Tim Budd) (09/25/90)

To Martin Howe, who said:

> There are at the moment, four well-known programming pradgigms: imperative,
> funtional, logic and object-oriented. There may be others, but these ones
> are the main four at the moment. People often ignore the fact that real-world
> problems often require one or more language types to solve them and for this
> reason, I have suggested in the past and will continue to suggest, that a
> ``multi-language'' which covers all four is, rather than an ``ideal
> impossibility'' or ``too difficult to implement'' or a ``bloated compiler''
> [substitute whinge of your choice], an ABSOLUTE NECESSITY if anything even
> remotely like an ``ideal'' programming language is ever to be designed.

And to our valued moderator, who added:
> ... More specific proposals could be persuasive. 

I would like to make the following comments.  Yes, the trick in designing
such a language is to avoid using a large pot into which you throw
everything anybody would ever like.  Instead, you need to try to define a
SMALL (syntactically and semantically) language in which the pieces of the
various paradigms can be fit together naturally, so that the sum is more
than the parts.  My students and I have developed such a language which 
targets the four paradigms mentioned, which we call LEDA.  The grammar for 
LEDA is approximately the size of the PASCAL grammar.  In the next few
years we hope to show that such a multipardigm language is indeed very
useful.  How?  My examining the ``classic'' computer science algorithms
from a multiparadigm standpoint.  For example, in a compiler (such as a
LEDA compiler itself), the parser might be written using PROLOG style
logical rules, the symbol table written in an object oriented style, and
the transformations on an intermediation form written using a functional
style.

A paper on LEDA will appear in IEEE software shortly, I can send out other
technical reports to those who are intersted.  No, the compiler is not
ready for public display yet.

(Of course, the most beautiful language will be the child of LEDA,
after we have learned from our experience with LEDA...)

--tim budd, budd@cs.orst.edu
department of computer science
oregon state university
corvallis, oregon
97331
-- 
Send compilers articles to compilers@esegue.segue.boston.ma.us
{ima | spdcc | world}!esegue.  Meta-mail to compilers-request@esegue.