# Re: What's the difference between send and instance\_eval?

**URL:** <https://www.ruby-forum.com/t/re-whats-the-difference-between-send-and-instance-eval/73754>\
**Category:** Ruby\
**Created:** [October 26, 2006, 9:24pm UTC](https://www.ruby-forum.com/t/re-whats-the-difference-between-send-and-instance-eval/73754 "2006-10-26T21:24:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 26, 2006, 9:24pm UTC](https://www.ruby-forum.com/t/re-whats-the-difference-between-send-and-instance-eval/73754/1 "2006-10-26T21:24:41Z")

</div>

> I may not understand it well, but I don’t like it. The two methods are  
> so similar that the only way to figure out the difference is to find  
> cases that will make it hard or impossible to use one of them. It  
> should be easy to choose which method to use, not hard to figure out  
> which one not to use.

OK, here you go:

- Use send when you want to invoke a method, but you have a variable  
holding the name of a method.
- Use instance\_eval when you want to muck about with the internals of an  
object.

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 26, 2006, 9:42pm UTC](https://www.ruby-forum.com/t/re-whats-the-difference-between-send-and-instance-eval/73754/2 "2006-10-26T21:42:44Z")

</div>

Thanks alot, you nice Ruby-people.

One last question:

Is it the Ruby language that make programmers be good, or is it that  
good people are drawn too the Ruby language?

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 26, 2006, 11:04pm UTC](https://www.ruby-forum.com/t/re-whats-the-difference-between-send-and-instance-eval/73754/3 "2006-10-26T23:04:52Z")

</div>

michele wrote:

> One last question:
> 
> Is it the Ruby language that make programmers be good, or is it that  
> good people are drawn too the Ruby language?

Yes to one, maybe to the other, results not sorted. 🙂

In all seriousness, computer languages have historically tended to  
reflect  
the intentions of their creators, and creating easy-to-use languages has  
rarely been on anyone’s radar screen, compared to issues of job  
security,  
making oneself look brilliant, and locking out the unwashed masses.

Doctors until recently excluded the masses by speaking Latin, geeks  
exclude  
the masses by speaking a kind of technical shorthand, one in which there  
is  
an obscure computer term or instruction for every imaginable real-world  
contingency (techy-wife to techy-husband at bedtime: “So, are we online  
tonight or what?”). It’s sort of like being a teenager your entire life.

There just aren’t many languages that approach Ruby for readability, for  
a  
reasonable correspondence between how people think and what can be  
executed  
by the interpreter:

read(file) unless(busy\_sleeping)

And there are only a certain number of programmers constitutionally  
disposed  
to allow their code be this readable and transparent. At its most basic,  
it  
is the difference between:

“I can solve your problem.”

– and –

“You can solve your problem.”
