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 6560139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:25:16+00:00 2026-05-25T13:25:16+00:00

Is there an advantage to defining a function like (defun hi () Hi!) and

  • 0

Is there an advantage to defining a function like (defun hi () "Hi!") and be able to call it by using (hi) or (HI) or (Hi), or to (setf a-number 5) and be able to access that number using a-number, A-NUMBER, or A-Number?

If there is such an advantage, then why are most other languages case-sensitive?

  • 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-25T13:25:17+00:00Added an answer on May 25, 2026 at 1:25 pm

    Using case sensitive names in code within an interactive session is just more error-prone: one not only has to get the characters, but also their case right and there might be several identifiers whose names only differ in case.

    Common Lisp is case sensitive. It is just that the Common Lisp reader functionality by default converts all unescaped characters of symbols to uppercase. This is also defined in the Common Lisp standard. The predefined Common Lisp symbols are also all uppercase internally.

    a symbol is internally upcase:

    CL-USER 3 > 'defparameter
    DEFPARAMETER
    

    The input case by default does not matter:

    CL-USER 4 > 'deFParameTER
    DEFPARAMETER
    
    CL-USER 5 > 'DEFPARAMETER
    DEFPARAMETER
    

    a symbol has an upcase name:

    CL-USER 6 > (symbol-name 'defparameter)
    "DEFPARAMETER"
    

    how many symbols are in the CL package:

    CL-USER 7 > (length (apropos-list "" "CL"))
    978
    

    Is every symbol in the CL package upcased?

    CL-USER 8 > (every (lambda (symbol)
                         (every (lambda (c)
                                  (eql c (char-upcase c)))
                                (symbol-name symbol)))
                       (apropos-list "" "CL"))
    T
    

    Using uppercase was common on old machines. Remember, the design of Common Lisp started in the early eighties (1982) and a goal was compatibility with earlier Maclisp and when there were more types of computers to support (like the so-called Mini Computers and Mainframes). Other programming languages used on older computers also use uppercase identifiers, like COBOL or PL/1.

    Also note that Lisp often was used interactively, so that during an interactive programming session getting the case of names right is more difficult. It is slightly easier when the Lisp reader uses a default case (here uppercase) and converts all input to this case.

    Common Lisp supports other reader modes and you can also escape symbols: |This is a Symbol with mixed CASE and spaces|.

    Today a lot of software is either lowercase or even case sensitive with lowercase preferred. Some Lisp vendors provide a non-standard variant of Common Lisp, where all symbols by default are lowercase and the reader is case preserving. But this makes it incompatible with standard Common Lisp, where the expectation is that (symbol-name 'cl:defun) is "DEFUN" and not "defun".

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any advantage over using a class over a struct in cases such
Is there any advantage to using __construct() instead of the class's name for a
Is there any advantage of using java.util.concurrent.CountdownLatch instead of java.util.concurrent.Semaphore ? As far as
Is there any advantage to writing a PHP conditional like this: if ($variable !=
Is there any advantage in using one over the other? Should I use the
Is there any advantage of using int vs varbinary for storing bit masks in
Is there any advantage of having the option of using private extension methods? I
I create indexes without the USING BTREE clause. Is there any advantage of using
Is there any advantage in using file writing with overlapped IO in Windows, vs
Is there any advantage to conditionally defining functions in PHP? For example, if I

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.