From: Rainer Joswig on
In article <820dc8F3lvU1(a)mid.individual.net>,
Tamas K Papp <tkpapp(a)gmail.com> wrote:

> Hi,
>
> I am not completely clear on the applications of the #: read macro for
> uninterned symbols. Redshank inserts it everywhere before symbols
> (defsystem, in-package, and other forms), but AFAIK ASDF loading
> happens in a temporary package anyway, so it should not be necessary.
> Nevertheless, I have seen ASDF files peppered with #: all over the place,
> so maybe I am mistaken.
>
> When is it "good style"/recommended to use #:?
>
> Tamas

If you don't care about lower case modes (aka 'modern mode')
then a "STRING" is just as fine - in many places.

--
http://lispm.dyndns.org/
From: Ron Garret on
In article <820hfbFr2bU1(a)mid.individual.net>,
Tamas K Papp <tkpapp(a)gmail.com> wrote:

> On Tue, 06 Apr 2010 12:40:16 +0200, Pascal Costanza wrote:
>
> > On 06/04/2010 11:31, Tamas K Papp wrote:
> >> Hi,
> >>
> >> I am not completely clear on the applications of the #: read macro for
> >> uninterned symbols. Redshank inserts it everywhere before symbols
> >> (defsystem, in-package, and other forms), but AFAIK ASDF loading
> >> happens in a temporary package anyway, so it should not be necessary.
> >> Nevertheless, I have seen ASDF files peppered with #: all over the
> >> place, so maybe I am mistaken.
> >>
> >> When is it "good style"/recommended to use #:?
> >
> > There is no reason to worry too much about it. Using just keywords is
> > fine.
>
> Great! This is what I wanted to hear :-)

I would go even further: you should NEVER use #: because it breaks
READ-READ consistency (see CLHS 2.3.6). If you need an uninterened
symbol with a particular name you should call MAKE-SYMBOL directly to
make it clear what is going on.

rg
From: Zach Beane on
Ron Garret <rNOSPAMon(a)flownet.com> writes:

> you should NEVER use #: because it breaks READ-READ consistency (see
> CLHS 2.3.6). If you need an uninterened symbol with a particular name
> you should call MAKE-SYMBOL directly to make it clear what is going
> on.

For DEFPACKAGE, IN-PACKAGE, ASDF:DEFSYSTEM, etc., the uninterned symbol
is used only for the string it designates, and it is not evaluated.

Zach
From: Ron Garret on
In article <hpf252$esc$1(a)news.eternal-september.org>,
Tim Bradshaw <tfb(a)tfeb.org> wrote:

> On 2010-04-06 10:31:52 +0100, Tamas K Papp said:
>
> > When is it "good style"/recommended to use #:?
>
> I think it's good style when you want a name, and you want that name to
> obey the current upper/lowercase rules that the reader has, but you
> don't want to intern a symbol in whatever package is current.

It's better to use keywords because they also meet all these
requirements, and they also introduce less syntactic clutter and don't
break read-read consistency like #: does.

rg
From: Ron Garret on
In article <87k4skslja.fsf(a)hangup.portland.xach.com>,
Zach Beane <xach(a)xach.com> wrote:

> Ron Garret <rNOSPAMon(a)flownet.com> writes:
>
> > you should NEVER use #: because it breaks READ-READ consistency (see
> > CLHS 2.3.6). If you need an uninterened symbol with a particular name
> > you should call MAKE-SYMBOL directly to make it clear what is going
> > on.
>
> For DEFPACKAGE, IN-PACKAGE, ASDF:DEFSYSTEM, etc., the uninterned symbol
> is used only for the string it designates, and it is not evaluated.

Yes, but in those cases you don't need uninterned symbols. Keywords
work just fine. In fact, that is what keywords are for.

This is exactly why you should never use #: syntax. It is extremely
rare that you actually need an uninterned symbol with a particular name.
If you find yourself thinking that #:FOO is more appropriate than
(MAKE-SYMBOL "FOO") or #.(MAKE-SYMVBOL "FOO") you are almost certainly
doing something wrong.

rg