Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6728785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:12:40+00:00 2026-05-26T10:12:40+00:00

In a screen cast ( archived blog ) on Common List the author (Alexander

  • 0

In a screen cast (archived blog) on Common List the author (Alexander Lehmann) uses uninterned symbols for package names and exports.

(defpackage #:foo
  (:use :cl)
  (:export #:bar
           #:baz))

(in-package #:foo)

He also uses the sharp sign in front of anonymous functions.

(defun transposed (m)
  (make-instance 'matrix
                 :rows (matrix-cols m)
                 :cols (matrix-rows m)
                 :generator #'(lambda (i j) (matrix-at m j i))))

In the book Practical Common Lisp the sharp sign isn’t used for package names and exports as far as I have read.

What’s the reason for using the uninterned symbols (the sharp sign) in these cases?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:12:41+00:00Added an answer on May 26, 2026 at 10:12 am

    Using an interned symbol pollutes the package you’re currently in with symbols that are only used for their names anyway:

    [1]> *package*
    #<PACKAGE COMMON-LISP-USER>
    [2]> (defpackage bar)
    #<PACKAGE BAR>
    [3]> (find-symbol "BAR")
    BAR ;
    :INTERNAL
    

    Uninterned symbols don’t do that:

    ;; Uninterned symbols don't cause symbol pollution:
    [4]> (defpackage #:foo)
    #<PACKAGE FOO>
    [5]> (find-symbol "FOO")
    NIL ;
    NIL
    

    You can also use strings directly, but since you’re usually dealing with uppercase symbol names, they are less convenient to write:

    [6]> (defpackage "BARFOO")
    #<PACKAGE BARFOO>
    [7]> (find-symbol "BARFOO")
    NIL ;
    NIL
    

    Example

    To illustrate the problem, consider the following interaction:

    [1]> (defpackage hello (:use cl) (:export hello))
    #<PACKAGE HELLO>
    
    ;; Let's write some FOO stuff...
    [2]> (defpackage foo (:use cl))
    #<PACKAGE FOO>
    [3]> (in-package foo)
    #<PACKAGE FOO>
    
    ;; Oh, I forgot to import HELLO!
    ;; Let's fix that.
    FOO[4]> (defpackage foo (:use cl hello))
    *** - (COMMON-LISP:USE-PACKAGE (#<PACKAGE HELLO> #<PACKAGE COMMON-LISP>)
          #<PACKAGE FOO>): 1 name conflicts remain
          Which symbol with name "HELLO" should be accessible in #<PACKAGE FOO>?
    
    ;; Oops.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wathced a screen cast on DDD by Greg Young the other day which
I am trying to create a screen cast for my new web app. I
I'm following a screen cast on a ruby gem called pry . At 8:10,
I am working on a project needs a screen cast/screen share/remote desktop control feature.
In my Swing application, I'm using a custom module to record a screen cast.
I am making a screen cast nor capture of the functionality of our application.I
I have followed a screen cast form ryan bates railscast and every thing is
First off, I created a screen cast, in order to explain what I have
I have tried to cast an implementation of my UIView class to my view
When I switch between zoom to fill screen and stretch to fill screen my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.