Philosophical musings: interpreting models

Jim Little jiml@inconnect.com
Fri, 10 Sep 1999 00:55:02 -0600


Laurent Martelli wrote:
> 
> >>>>> "Jim" == Jim Little <jiml@inconnect.com> writes:
> 
>   Jim> LISP's semantics are very clean, but they're also very
>   Jim> low-level.
> 
> ??? To me the semantics of Lisp can be summed up as "call functions
> with parameters which are objects, and do something wity the result
> which is also an object. Plus the fact that you can bind a symbol to
> an object". I think this is very high level because it does not
> mention memory, CPU, storage, IO ...

I agree that it's better than hardware-level semantics, but I still
think Lisp's semantics are very low-level.  They don't relate to real
world actions, only mathematical ones.  Here's what I see as high level
semantics:

. Dial a phone number
. Print a document
. Display a picture
. Calculate income tax
etc

I.e., real-world programming goals.

>   Jim> Even if LISP were compiled, it couldn't understand that it's
>   Jim> allowed to compile the program "DISPLAY 'Hello world'" into a
>   Jim> windowed application AS WELL AS a console application.  A
>   Jim> very-high-level language's compiler would have that knowledge.
> 
> What prevents you from writing such a display function which is able
> to choose how to display depending on the device it can use ? Why
> should the compiler have to do this when this can be done at the
> "user-level" ?

Well, in addition to leading to large and difficult to understand code,
that approach isn't very flexible.  Languages specify certain semantics
and then the compiler has total flexibility in how those semantics are
implemented.  Different compilers can implement the same semantics in
totally different ways, and compete based on the strength of those
implementations.  If you code the choice directly into your function,
there's no outside involvement and no way for two different approaches
to the same feature to compete.

Jim