[Openmcl-devel] foreign type name escaping

Gary Byers gb at clozure.com
Wed Nov 17 16:19:51 PST 2004

On Wed, 17 Nov 2004, John Wiseman wrote:

> It seems that foreign types have to be named using the
> <F>unky<E>scaping scheme, right?
> ":|CFRunLoopTimerRef|" seems so much easier to type (or paste)
> than ":<CFR>un<L>oop<T>imer<R>ef", but maybe I'm missing
> something.
> Am I missing something?

The basic thinking was that "lowercase predominates in Unix
type/structure names", which is probably true of traditional POSIX
stuff.  It seemed (and still seems) preferable to be able to use
:stat to refer to "stat" structures, and to not force any sort
of lisp-reader-level escaping to deal with that common.

The current behavior is to force names that don't contain angle
brackets to lower case (the :stat/:STAT case).  If the name's
already in ,mixed case (presumably because of lisp-reader escaping)
as in your example, then it seems reasonable to preserve the case
information that somebody's gone to some trouble to create ...

So, we'd have:

a) if the lisp name contains angle brackets, they're used as they are

b) Otherwise, if the lisp name is mixed case, the foreign name is the
   same as the lisp name (with case preserved)

c) Otherwise, the foreign name is the same as the lisp name with all
   upppercase characters downcased.

Currently, we skip rule (b).

Does that seem reasonable ?

Note that if there were a foreign type named "STAT" (distinct from
"stat"), you'd still have to use :<STAT> to refer to it.  That still
strikes me as being preferable to always having to say :|stat| to
refer to the traditional "stat" structure.

More information about the Openmcl-devel mailing list