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

  • Home
  • SEARCH
  • 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 354271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:54:30+00:00 2026-05-12T11:54:30+00:00

I typed this into Clojure REPL (using the enclojure Netbeans plugin): user=> hello, world

  • 0

I typed this into Clojure REPL (using the enclojure Netbeans plugin):

user=> "hello, world"
"hello, world"
nil

What’s the nil about?

  • 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-12T11:54:30+00:00Added an answer on May 12, 2026 at 11:54 am

    Every function or macro call returns a value in Clojure, even things like if statements or looping constructs or toplevel function definitions or print statements, which in other languages are “statements”. There’s no statement/expression dichotomy in Lisps; everything is an expression.

    So println and friends print to standard-output as a side-effect and return nil, as do most functions which don’t have anything useful to return.

    But typing a literal string at the REPL should return the string itself, as in digitalross’ post.

    user> (println "hello world")
    hello world
    nil
    user> "hello world"
    "hello world"
    user>
    

    In the first case, the hello world line is what was printed to standard-output by println. nil is the returned value of println. In the second case, "hello world" is the returned value of "hello world" since a string evaluates to itself. Nothing is printed to standard-output in this case.

    (SLIME and some other REPL interfaces will helpfully color standard-output (the hello world line above) differently from the returned value of what you typed at the REPL (nil above), since it might be confusing otherwise.)

    This is what you should see at a REPL. What you posted must be an artifact of Enclojure.

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

Sidebar

Ask A Question

Stats

  • Questions 183k
  • Answers 183k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Something like: var projects = from project in xDoc.Root.Elements("Project") let… May 12, 2026 at 4:42 pm
  • Editorial Team
    Editorial Team added an answer Unix standard return codes use '0' as OK - by… May 12, 2026 at 4:42 pm
  • Editorial Team
    Editorial Team added an answer It is not technically supported by the spec. I am… May 12, 2026 at 4:42 pm

Related Questions

While dabbling in Clojure I've written a very basic program to echo whatever the
Is there a way to serialize a lexical closure in Python using the standard
I have a control and it provides a selection mechanism. However, the items that
I Just can't seem to wrap my head around them. As I understand it's

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.