Subject: Re: PLOT: A non-parenthesized, infix Lisp!
From: (Rob Warnock)
Date: Tue, 21 Apr 2009 23:44:48 -0500
Newsgroups: comp.lang.lisp,comp.lang.misc,comp.lang.scheme
Message-ID: <>
Kenneth Tilton  <> wrote:
| Andrew Reilly wrote:
| > Christopher wrote:
| >> budden <> wrote:
| >>> C is not, strictly speaking, a statically typed language.
| >> Yes it is. All types are known statically at compile time. You can build
| >> dynamic schemes in C, but the language itself is nevertheless still
| >> statically typed.
| > 
| > void *
| Ah, the value infinity in typese.

But essentially useless for implementing a dynamic layer on C,
since you can't do any arithmetic at all on "void *" objects.

On the other hand, you *can* do simple pointer arithmetic on the
type "void **", so the latter is perhaps a better choice for a
Lisp object, e.g., "typedef void ** lispobj". I actually did this
once for a hacked-up version of Elk Scheme[1]. Worked fine.

On the third hand, even "void **" has a few odd corner restrictions,
so most Lisps (e.g., CMUCL) end up with "typedef long lispobj" or
similar, and use lots of C macros to pun the integer lispobjs into
pointers instead of lots of macros to pun the pointer lispobjs into


[1] In order to make the "Object" type smaller.
    It was two words originally:

      typedef struct {
	  unsigned long data;
	  int tag;
      } Object;

    Replacing that with "typedef void **Object;" (and tweaking the
    various access macros to use lowtags) made the code run faster,
    at least on x86 CPUs.

Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607