What happened to Block class?

Hello –

Just wondering why the Block class was eliminated. (I missed a
few weeks of ruby-talk and ruby-core, but I don’t think it was
discussed there – correct me if I’m wrong.)

David

···


David Alan Black
home: dblack@superlink.net
work: blackdav@shu.edu
Web: http://pirate.shu.edu/~blackdav

???

Pardon my ignorance… I didn’t know
there ever was a Block class.

Hal

···

----- Original Message -----
From: dblack@superlink.net
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Friday, July 18, 2003 12:53 PM
Subject: what happened to Block class?

Hello –

Just wondering why the Block class was eliminated. (I missed a
few weeks of ruby-talk and ruby-core, but I don’t think it was
discussed there – correct me if I’m wrong.)


Hal Fulton
hal9000@hypermetrics.com

Hi –

···

On Sat, 19 Jul 2003, Hal E. Fulton wrote:

----- Original Message -----
From: dblack@superlink.net
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Friday, July 18, 2003 12:53 PM
Subject: what happened to Block class?

Hello –

Just wondering why the Block class was eliminated. (I missed a
few weeks of ruby-talk and ruby-core, but I don’t think it was
discussed there – correct me if I’m wrong.)

???

Pardon my ignorance… I didn’t know
there ever was a Block class.

It existed briefly in CVS. I believe it grew out of the discussions
of different argument semantics for blocks and procs (see the thread
at http://www.ruby-talk.org/70034).

David


David Alan Black
home: dblack@superlink.net
work: blackdav@shu.edu
Web: http://pirate.shu.edu/~blackdav

Hi,

Just wondering why the Block class was eliminated. (I missed a
few weeks of ruby-talk and ruby-core, but I don’t think it was
discussed there – correct me if I’m wrong.)

???

Pardon my ignorance… I didn’t know
there ever was a Block class.

It existed briefly in CVS. I believe it grew out of the discussions
of different argument semantics for blocks and procs (see the thread
at http://www.ruby-talk.org/70034).

It has been merged to Proc again. Now they are distinguished
by how to create.

$ ruby -e ‘Proc.new {|a,b|}.call’
$ ruby -e ‘proc {|a,b|}.call’
-e:1: wrong number of arguments (0 for 2) (ArgumentError)
from -e:1:in `call’
from -e:1

···

At Sat, 19 Jul 2003 03:19:57 +0900, dblack@superlink.net wrote:


Nobu Nakada

Hi –

···

On Sat, 19 Jul 2003 nobu.nokada@softhome.net wrote:

Hi,

At Sat, 19 Jul 2003 03:19:57 +0900, > dblack@superlink.net wrote:

Just wondering why the Block class was eliminated. (I missed a
few weeks of ruby-talk and ruby-core, but I don’t think it was
discussed there – correct me if I’m wrong.)

???

Pardon my ignorance… I didn’t know
there ever was a Block class.

It existed briefly in CVS. I believe it grew out of the discussions
of different argument semantics for blocks and procs (see the thread
at http://www.ruby-talk.org/70034).

It has been merged to Proc again. Now they are distinguished
by how to create.

$ ruby -e ‘Proc.new {|a,b|}.call’
$ ruby -e ‘proc {|a,b|}.call’
-e:1: wrong number of arguments (0 for 2) (ArgumentError)
from -e:1:in `call’
from -e:1

Can you elaborate on the reason for doing it that way, instead of a
different class? The Block class seemed much cleaner to me.

David


David Alan Black
home: dblack@superlink.net
work: blackdav@shu.edu
Web: http://pirate.shu.edu/~blackdav

Hi,

···

At Sat, 19 Jul 2003 03:56:43 +0900, dblack@superlink.net wrote:

It has been merged to Proc again. Now they are distinguished
by how to create.

$ ruby -e ‘Proc.new {|a,b|}.call’
$ ruby -e ‘proc {|a,b|}.call’
-e:1: wrong number of arguments (0 for 2) (ArgumentError)
from -e:1:in `call’
from -e:1

Can you elaborate on the reason for doing it that way, instead of a
different class? The Block class seemed much cleaner to me.

According to Matz diary (Matzにっき(2003-06-16)),
apparently, because they are too similar.


Nobu Nakada

Hi,

···

In message “Re: what happened to Block class?” on 03/07/19, nobu.nokada@softhome.net nobu.nokada@softhome.net writes:

Can you elaborate on the reason for doing it that way, instead of a
different class? The Block class seemed much cleaner to me.

According to Matz diary (Matzにっき(2003-06-16)),
apparently, because they are too similar.

If you want better explanation, ask Dave Thomas. I explained this
issue to him face to face at the OSCON last week about for half hour.
I believe he understood both the behavior and the reason.

						matz.