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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:34:53+00:00 2026-06-18T22:34:53+00:00

I am not sure if I understand what variable binding means. This might be

  • 0

I am not sure if I understand what variable binding means. This might be a programming concept that isn’t specific to Ruby. It almost seems like its a basic concept that some books expect you to already know what that means.

Here’s my understanding so far:
Whenever a Ruby object is instantiated, what this actually means is that Ruby allocates a space in memory to designate this object. If you assign an object to a variable, you’re not actually storing the object in the variable but instead you’re storing the reference to that object in the variable. I think binding refers to this concept where the variable is “bound” to the object associated with it, but I’m not entirely sure if this represents the meaning of binding and bound.

Can someone help explain this to me, preferably through the use of a simple example if possible?

  • 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-18T22:34:54+00:00Added an answer on June 18, 2026 at 10:34 pm

    The concept you are mentioning in the second paragraph is about pointers, and is not directly related to binding.

    As you noticed, binding is not specific to Ruby. It is a term widely used in formal handling of languages including programming languages as well as natural languages. There are expressions that have their own fixed meaning, which in programming languages are called constants, and in natural languages proper nouns (or, casual Americans also call it names). On the opposite are expressions that do not refer to anything by themselves but need to be assigned their value in some way. These are called variables in programming languages, and pronouns in natural languages.

    In a context where a variable has not been assigned a value, the variable is said to be free. Otherwise, the variable is bound. Variable x in the following expression is free.

    x**2
    

    There are several ways a variable can be bound. One way is assignment. In the following, x has been assigned a value 3 in the first line, so it is bound within the scope.

    x = 3
    x**2
    

    Another way is to quantify over it. In the following, the x within the block is bound by the x outside of it. Whatever value the outer x takes will be the value of the inner x.

    ->x{x**2}
    

    On the other hand, the outer x in the above expression is not bound. By calling the proc against some value as below, it becomes bound.

    ->x{x**2}.call(3)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not sure I understand scope - does an out-of-scope variable (I'm using Ruby)
Here's my fiddle : http://jsfiddle.net/JWww3/ I'm not sure to understand why this code is
This is a really short question I think but I'm not sure I understand
I am not sure that I understand Isolated storage. I read the article http://msdn.microsoft.com/en-us/library/3ak841sy%28VS.80%29.aspx
I am not sure how to ask this, but hopefully someone will understand. Lets
From MSDN document i understand ( I am not sure,i understand perfectly ) :
I'm having problems and I'm not sure I understand the STL documentation. Let's say
I found some old code which I'm not sure I understand completely. The folowing
I've read the documentation , but I'm still not sure I understand everything. Especially
Not sure I fully understand what phpmyadmin does. I created a database in phpmyadmin,

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.