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

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

In message "[ruby-talk:00895] Re: Contrast Ruby and Other Languages"
    on 99/11/01, Clemens Hintze <clemens.hintze@alcatel.de> writes:

|> - incomplete OOP 
|
|That is the only point, IMHO, that is wrong. So I would not second
|that. Python has complete OOP, but ... see below:

How about `inconvenient OOPL'?

|So, I mean, Array#collect or Array#find, are iterators. But
|e.g. File#open is not an iterator, but it can also receive a
|block, to do something.

I understand your feeling.  We may be abusing the word iterator :-)

|BTW: That is also a reason I don't like the 'iterator?' keyword to
|much! I would prefer an alias like 'has_block?' or something like that.

It was once talked in Japanese speaking list[ruby-list:13757].
I can add an alias iff I find good (from my view) name.

  block_given?
  with_block?
  has_block?
  have_block?

We use plain form verbs in Ruby libraries (e.g exist?, not exists?),
so `have_block?' is more preferred to `has_block?'.

How do you feel?  Which one do you like best?  Or other candidate?

|Here is my trial (beeing too verbose as I ever am ... ;-):

Well, it's... good ... but..

The original list is intended to be mere deference list.  We may have
to make Ruby PR pages for each other languages.  Anyway, I will add
the items such as:

  * Some object is not a class instance.  Type/class mix
    prevents uniform object treatment.  Extension modules in C
    can't generate class instances.
  * Can't inherit classes defined in C.
  * Hard to make classes mostly defined in the script, partly defined
    in C.
  * No real closure (unnamed function can be made by lambda, though).

And I'll put some of your statement into the `What's Ruby' page.

                                                        matz.

In This Thread