From: Dave Thomas <Dave / thomases.com>
Sent: Saturday, February 05, 2000 5:11 PM

> Clemens Hintze <c.hintze / gmx.net> writes:
<<snip>>
> > Yes. Every closure is an instance of class Proc. A block, however, is
> > only code surrounded by '{' and '}' or 'do' and 'end'. We can use
> > 'lambda' or 'proc' or 'Proc.new' to convert a block to a closure
> > (means Proc instance). Or we could use 'yield' to execute a block.
>
> I think we're agreeing! I think your original note mentioned a
> "closure object", and I was simply suggesting for consistency we
> should call objects by their class's name were possible a String
> object, a File object, and a Proc object. I agree absolutely we need
> to distinguish between unbound blocks and closures.

I'm all for consistency attained by "calling by (user view of) function"
rather than "calling by implementation". (English pun; sometimes "calling"
means "naming". :-) I think this would help beginners learn Ruby, while
complying with the principle of least surprise for more advanced users.

But out of curiosity, what terms (if any) are used for these sorts of things
(and the other things mentioned earlier in this thread) by other OO
languages (for example, CLOS/Lisp, Eiffel, Smalltalk, Python, and (proposed
extensions to) Java) in particular, and by the computer science community in
general? Do they have any terms worth copying?

It might be useful to have a FAQ entry for a comparison of Ruby OO
things/terms and those of other OO languages. (Cases were the same terms are
used should probably also be included, if there are subtle or significant
differences in behavior/implementation.) This might be a useful addition to
the www.ruby-lang.org language comparison page.