Philosophical musings: interpreting models

btanksley@hifn.com btanksley@hifn.com
Wed, 15 Sep 1999 10:06:48 -0700


> From: Jim Little [mailto:jiml@inconnect.com]
> Subject: Re: Philosophical musings: interpreting models

> I'd like to
> take this opportunity to talk about my definitions of low and high
> level:

> To me, the "level" of a language or library is directly 
> related to what
> kind of task you're trying to accomplish.  The language or library is
> high-level if it allows you to accomplish your task directly, without
> having to specify any intermediate tasks.  The language or library is
> low-level if it requires you to accomplish your task by specifying
> intermediate tasks, rather than the task itself.

I would say that this applies ONLY to the library, not the language.  A
language is high-level if it allows such libraries to be written in it.

> Here's an example of a high-level language.  The task is to dial a
> phone.
> dial 555-1212.

> The same task in a low(er)-level language:
> pick up handset
> press 5
> press 5
> press 5
> press 1
> press 2
> press 1
> press 2

That's very high level for a robot control, if that's what you're doing.

Take a look at the Lisp equivalent:

(dial :number #n555-1212)

Note that 'dial' is a defmethod, so this is also valid:

(dial :person #p<Frank T.>)
(dial :device myModem :number #n555-1212)
(dial :for-what pizza)  ;; slang works!
(gladp (used dial))     ;; now it's a noun :)
(dial)   ;; prank phone call?

> That's why I say Lisp is a low-level language -- for most tasks, its
> semantics aren't even close to those required for the task at hand. 

But they are automatically brought close!  That's the beauty.

And BTW, some people here have claimed that Lisp doesn't do type checking.
On the contrary, it does.  You merely have to ask for it -- for example, by
using defmethod rather than defun, or by using declare.

> Yes, you can write high-level functions, but there's a difference
> between a high-level language and a low-level language with high-level
> functions, which I address in my email to Laurent.

The ONLY difference is library, not language.

> Jim

-Billy