Subject: Re: Sharp with exports in defpackage??
From: rpw3@rpw3.org (Rob Warnock)
Date: Tue, 28 Feb 2006 04:01:04 -0600
Newsgroups: comp.lang.lisp
Message-ID: <bs2dnQy0yob9gpnZRVn-qw@speakeasy.net>
josephoswaldgg@hotmail.com <josephoswald@gmail.com> wrote:
+---------------
| Jonathon McKitrick wrote:
| > Is there an advantage in using # with exports in defpackage?  ...
| 
| More precisely, #:name symbols do not get interned by the reader into
| any package. :name symbols also can be used reliably, but get interned
| by the reader into the keyword package. "NAME'" strings do not get
| interned into any package, either, but require one to strike the caps
| lock key twice, or remember the upcase keystroke in your editor...
+---------------

Another reason to use symbols [whether uninterned or keyword]
instead of "NAME" strings is to avoid problems when the user
is running with a non-standard READTABLE-CASE mode. When symbols
such as #:name are typed in in lowercase, they'll "do the right
thing" regardless of whether (READTABLE-CASE *READTABLE) is the
CLHS default :UPCASE or the increasingly-popular-when-doing-FFI
:INVERT mode. Whereas "NAME" breaks in the latter case...


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607