Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!quintus!ok
From: ok@quintus.uucp (Richard A. O'Keefe)
Newsgroups: comp.lang.misc
Subject: Re: Unification of Paradigms
Message-ID: <469@quintus.UUCP>
Date: 23 Sep 88 07:18:25 GMT
References: <3923@okstate.UUCP> <8943@srcsip.UUCP> <3938@okstate.UUCP>
Sender: news@quintus.UUCP
Reply-To: ok@quintus.UUCP (Richard A. O'Keefe)
Organization: Quintus Computer Systems, Inc.
Lines: 37

In article <3938@okstate.UUCP> norman@a.cs.okstate.edu (Norman Graham) writes:
>I am saddened by the crippling of procedural languages by static
>type systems; lack of first class citizenship for all objects; 
>inability to specify things such as lazy or eager evaluation,
>the environment to operate in, and to use a store or not; and the 
>lack of higher order type systems.  The current procedural languages
>can be extended a great deal before they cease to be procedural.)

(1) First-class citizenship for all objects:  there are _very_ few programming
    languages which really make functions first-class citizens (that is,
    define equality on functions as is standard in 2nd-order logic).
    I do know of two, but I can't remember their names.

(2) Lazy evaluation:  lazy evaluation is fine, and side effects are fine, but
    if you combine them in one language you are going to have troubles.  See
    Peyton-Jones' book for examples of how hard it is for a human reader to
    tell whether a function will be lazy or not.  (Try programming with
    Pop-2 "streams" -- lazy lists -- some time.)

(3) Higher-order type systems:  you have to be _very_ careful if you want
    type-checking to be computable.  Martin-Loef's "Type Theory" is a
    programming language!  (type=set=proof=program)

They're all nice features, but putting them together and making the result
compile fast, run fast, and use a small run-time library is far from easy.
There is still some excuse for C.

>1) function invocation and unification exit as independent concepts,
>   side-by-side in the language.

I'm not quite sure what's meant here.  Prolog, for example, hasn't got
functions, only predicates.  There are several proposals for extending
Prolog with evaluable functions, generally based on demodulation or on
narrowing, which amount to building function invocating into unification.

Apart from the lack of any kind of static type checking, PopLog seems to
come close to Graham's requirements.  Then there are things like Eiffel.