Jason Merrill wrote:
> It seems well known that the Array constructor form
> 
> Array.new(n, obj)
> 
> causes a common gotcha for programmers new to ruby (see * below for
> details).  My question: is there ever any reason to use this form in
> favor of
> 
> Array.new(n) {block}
> 

If them silly functional languages are to be trusted, constants, and 
pure functions of no arguments are interchangeable.

There's no language-wise reason to use a constant instead of a lambda 
that always returns that constant. Except that it's adding epicycles - 
the former is easier to read in most cases.

And oh yes. Overgeneralising horribly, blocks are slow(er than the 
alternative in any case).

David Vallner