[#3986] Re: Principle of least effort -- another Ruby virtue. — Andrew Hunt <andy@...>

> Principle of Least Effort.

14 messages 2000/07/14

[#4043] What are you using Ruby for? — Dave Thomas <Dave@...>

16 messages 2000/07/16

[#4139] Facilitating Ruby self-propagation with the rig-it autopolymorph application. — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/07/20

[ruby-talk:04132] Re: Function objects. was: What are you using Ruby for?

From: Dave Thomas <Dave@...>
Date: 2000-07-19 18:36:10 UTC
List: ruby-talk #4132
Johann Hibschman <johann@physics.berkeley.edu> writes:

> > One of the things about functions is that referencing one in a
> > pure OO language requires that you at some point bind it to an
> > object. A function on its own means nothing. Take the humble '+'
> > operator, for instance. Send it to a number, and you get addition;
> > send it to a string, concatenation.
> 
> This does seem a bit weird to me, though.  A function is a function
> is a function.  It's a mapping from a domain space to a range space.
> As such it's as real as anything.

True, but then again 'f' amd '+' are not functions but names: the
underlying functions are accessible via these names. In object-
oriented languages, the binding of names to the corresponding
functions is often deferred: even in more static languages such as C++
you can't tell the meaning of

   a = b + c

without knowing the types of a, b, and c.

Regards


Dave

In This Thread