[ruby-talk:00899] Re: Contrast Ruby and Other Languages

From: matz@... (Yukihiro Matsumoto)
Date: 1999-11-02 07:18:23 UTC
List: ruby-talk #899
Hi,

In message "[ruby-talk:00898] Re: Contrast Ruby and Other Languages"
    on 99/11/02, Clemens Hintze <c.hintze@gmx.net> writes:

|All is *an* object, does not necessarily mean, that control structures
|also have to be an object, IMHO. It only means to me, that all you can
|graps or use (like: "hello", 1, proc{print"world"}) is an object. But
|matz has decided, that blocks are not things you can grasp (yield
|doesn't count here). Perhaps he has performance reasons? But you can
|convert such a block to a Proc instance, so that it would be
|graspable (nice word, isn't it? ;-)

In addition, contol structure being object is mere illusion in most
Smalltalk implementation.  The compiler detect the ifTrue selecter,
etc., then turn them into conditional bytecode instructions.  No block
object generated in execution.  So that even if you redefine ifTrue
method, the bytecode interpreter wouldn't invoke the method.

Why do I have to put the thing even Smalltalk abandoned (leaving
illusion though) in Ruby?  They are ugly too, I think.

                                                        matz.

In This Thread