[#2529] concerns about Proc,lambda,block — "David A. Black" <dblack@...>

Hi --

39 messages 2004/03/01
[#2531] Re: concerns about Proc,lambda,block — ts <decoux@...> 2004/03/01

>>>>> "D" == David A Black <dblack@wobblini.net> writes:

[#2533] Re: concerns about Proc,lambda,block — "David A. Black" <dblack@...> 2004/03/01

Hi --

[#2537] Re: concerns about Proc,lambda,block — matz@... (Yukihiro Matsumoto) 2004/03/01

Hi,

[#2542] Re: concerns about Proc,lambda,block — Mathieu Bouchard <matju@...> 2004/03/02

[#2545] Re: concerns about Proc,lambda,block — matz@... (Yukihiro Matsumoto) 2004/03/02

Hi,

[#2550] Re: concerns about Proc,lambda,block — Mauricio Fern疣dez <batsman.geo@...> 2004/03/03

On Wed, Mar 03, 2004 at 07:51:10AM +0900, Yukihiro Matsumoto wrote:

[#2703] Proposed patch to add SSL support to net/pop.rb — Daniel Hobe <daniel@...>

This patch adds support to Net::POP for doing POP over SSL. Modeled on how

19 messages 2004/03/27
[#2704] Re: Proposed patch to add SSL support to net/pop.rb — Daniel Hobe <daniel@...> 2004/03/27

This is v2 of the patch. Cleaned up a bit and added some more docs.

[#2707] Re: Proposed patch to add SSL support to net/pop.rb — Daniel Hobe <daniel@...> 2004/03/28

v3 of the patch:

[#2721] Re: Proposed patch to add SSL support to net/pop.rb — Minero Aoki <aamine@...> 2004/03/30

Hi,

Re: concerns about Proc,lambda,block

From: Dave Thomas <dave@...>
Date: 2004-03-04 03:09:11 UTC
List: ruby-core #2563
On Mar 3, 2004, at 19:14, Yukihiro Matsumoto wrote:

> Hi,
>
> In message "Re: concerns about Proc,lambda,block"
>     on 04/03/03, Mauricio Fern疣dez <batsman.geo@yahoo.com> writes:
>
> |do you want to keep Proc and lambda as separate things (like Class &
> |Module) or would you consider merging them and reaching a compromise 
> on
> |their semantics?
>
> My current stand point is that conceptually lambda returns a Proc
> wrapped by argument checker and local jump handler, thus a Proc from
> lambda is still a Proc.  If you really wish to distinguish those two
> (wrapped proc and unwrapped proc), you still have chance to persuade
> me.

Matz:

I'm sorry to be stupid about this: normally I have no trouble 
understanding the way you're thinking about Ruby's semantics, but I'm 
suffering some kind of mental block here.

Based on what you said above, I'd expect the first and third calls of 
the following code not to generate a warning, but they do.

def meth(&b)
   b
end

pr = meth {|a| p a}
pr.call(1,2)

pr = lambda {|a| p a}
pr.call(1,2)

pr = Proc.new {|a| p a}
pr.call(1,2)



Cheers

Dave



In This Thread