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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:41:46+00:00 2026-06-15T11:41:46+00:00

What are the exact differences between underscore variables and a named variable that starts

  • 0

What are the exact differences between underscore variables and a named variable that starts with underscore from the Erlang compiler point of view (apart from adding readability to the code)?

For example are _ and _Var different?

  • 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-06-15T11:41:47+00:00Added an answer on June 15, 2026 at 11:41 am

    The don’t care variable _ is a VERY SPECIAL variable which matches anything and is NEVER bound to a value. It is used when I know there is something there but I don’t care what the value is and I will never use. Seeing _ is never bound it can not be used in an expression and the compiler flags it as an error.

    Variables like _Var are perfectly normal variables which you can match against and will be bound to values which means they can be used in expressions. Prefixing a variable with _ is about intent. The compiler normally warns you about a variable which is bound in a pattern but is never used, often a sign of an error. But the compiler does not warn for variables prefixed with _ like in _Var. The intent being that I want to give the variable a name, naming things is good, but that I know I will never use it.

    Remember that _ is really the only special variable and that _Var are normal variables and behave as such if used. If you are feeling perverse then you could prefix all your variables with _ and everything will still work.

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

Sidebar

Related Questions

I have 2 classes that have exact two functions. The difference between them is
What is the exact difference between live() and ready() ? Edit: found that die()
What are the exact differences between users and readers in the active directory roles.
What are the exact differences between OpenGL ES 2.0 and OpenGL 4.1. I'm aware
Possible Duplicate: How does an interpreter/compiler work Hi what is the exact difference between
I'm trying to understand where the style differences are coming from between my hosted
Can anybody show with some examples the exact difference between .. and ... operator?
I need to know the exact difference between: <form method=POST action=https://mywebsite/signon.php> <input name=harv_acc value=940322903
Can anybody explain (or suggest a site or paper) the exact difference between triggers,
I would like to know what is the exact difference between a class snippet

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.