From: Trans Date: 2005-10-14T10:26:54+09:00 Subject: Re: Default argument values for blocks David A. Black wrote: > That's one of the things I don't like about it. Just on a kind of > visceral level, { ... } conveys a much greater sense of a "closure". Yes, I felt that way as well. But I also sometimes feel like it's (visually) lopsided. each {|x| ... } > Actually, if we must have -> then it would be better to just make it > look more like a method definition, but anonymous: > > def x(a,b) > ... > end > > -> (a,b) > ... > end Hmmm, can that be done? That must cause possible ambiguities or why would we not be using {(x,y)...} already? But then again I know we can do def foo(x) do stuff ; end So I'm not sure. Matz had also suggested the possibility of ;; for end. Which with your concept would give. each -> (x) puts x ;; I think even uglier. Let's try this: each -> (x) puts x <- Oh, yea now were getting somewhere. How about we sub '{' and '}' for '->' and '<-'? Good idea? ;) I'm being silly but the point is that you indrectly raise the fair question of why not { (a,b) ... } > and just forget about the {}. ->(){} just requires too much visual > parsing and explaining. ->(){} ? Oh, you mean empty-block? :) T.