Hi --

On Fri, 5 Aug 2005, Jason Foreman wrote:

> I hadn't seen this particular variant posted in this thread yet.
> Apologies if it was and I missed it.  I make no claims as to its ease
> of parsing or whatever, but it looks better than many of the other
> options to me.
>
>
> bar = { x, y=3, z=b|5 ->
>  x + y * z
> }

The problem I have with this is that you can't tell until you get to
the -> that it isn't a hash.  There's no case in Ruby, that I've ever
been able to identify, where you have to go beyond the { to make that
determination:

   a = {w,x,y=3,z=5}  # hash
   a { x }            # block
   a({ x,y })         # hash

etc.  I'm not even thinking of it from the parser's point of view, but
only from the human's.  It introduces a whole new level of visual
uncertainty.

(This came up here or perhaps on ruby-core a few months ago, in
slightly different form I think but essentially the same concept.)


David

-- 
David A. Black
dblack / wobblini.net