[#4595] New block syntax — Daniel Amelang <daniel.amelang@...>

I'm really sorry if this isn't the place to talk about this. I've

25 messages 2005/03/21
[#4606] Re: New block syntax — "David A. Black" <dblack@...> 2005/03/21

Hi --

[#4629] Re: New block syntax — "Sean E. Russell" <ser@...> 2005/03/30

On Monday 21 March 2005 16:17, David A. Black wrote:

[#4648] about REXML::Encoding — speakillof <speakillof@...>

Hi.

15 messages 2005/03/31
[#4659] Re: about REXML::Encoding — "Sean E. Russell" <ser@...> 2005/04/04

On Thursday 31 March 2005 09:44, speakillof wrote:

Re: New block syntax

From: Michael Walter <michael.walter@...>
Date: 2005-03-21 14:03:57 UTC
List: ruby-core #4598
On Mon, 21 Mar 2005 22:42:01 +0900, Florian Gro<florgro@gmail.com> wrote:
> Daniel Amelang wrote:
> 
> > I really like the new proposed syntax for proc/blocks:
> >
> > b = {|| puts "good idea"}
> >
> > But the empty pipes make it ungraceful, in my opinion. I understand
> > the need to differentiate between the {} syntax for blocks and the {}
> > syntax for hashes. Thus, I propose that instead of changing the block
> > syntax to resolve the ambiguity, we change the hash syntax.
> 
> If we require Hashs to be of the { key => value } form instead of the {
> key, value } form then I think we could differentiate blocks and hashes
> without needing the empty argument list.

How does that work for empty hashes vs. empty-bodied lambdas?

Michael


In This Thread