News for hackers. Stuff that matters.
Re:Ask YC: Ruby and Lisp devs, please answer this (Not a fla... by brlewis on Monday January 14, 2008 @03:14PM (#98274)
It's not that there's something you can do in Lisp that absolutely can't be done in Ruby. It's just that it's more convenient in Lisp, e.g. real closures instead of seven or eight closure-like constructs.

I took a look at that Closures in Ruby page you mentioned.

It says about Ruby: "This is quite a dizzing array of syntactic options, with subtle semantics differences that are not at all obvious, and riddled with minor special cases. It's like a big bear trap from programmers who expect the language to just work."

Re:Ask YC: Ruby and Lisp devs, please answer this (Not a fla... by Zak on Monday January 14, 2008 @03:57PM (#98292)
Ruby has real closures with semantics similar to Lisp: lambda expressions that reference variables from their enclosing lexical scope. It also has a number of constructs that create closures implicitly, and some others that may or may not be implemented that way, but you're not required to use them. You can use closures just like you would in Lisp.