On 10/18/05, Sean O'Halpin <sean.ohalpin / gmail.com> wrote: > On 10/15/05, ES <ruby-ml / magical-cat.org> wrote: >> 2. Blocks/Procs versus anonymous methods. Should these be actually >> *different* > Short answer - yes. An anonymous function would mean you're not > carrying around a whole heap of baggage when no closure is required > and gives you a clean scope to help prevent accidental aliasing > errors. Except that Matz still plans on making anonymous functions have closure capabilities. This is why, after Dave Thomas suggested: anon = def(x = 5) # implementation of anon end I then suggested: anon = lambda(x = 5) # implementation of anon end To me, this is clearer than any of the other options that have been so far suggested for anonymous functions. I don't know that I'll be using anonymous functions for most of what I do in Ruby, but I can see the point of them and how they *are* subtly different than blocks. I just don't particularly care for the proposed syntax: anon = ->(x = 5) { ... } -austin -- Austin Ziegler * halostatue / gmail.com * Alternate: austin / halostatue.ca