tags:

views:

232

answers:

2

I've read that Ruby has inherited many features from Lisp.

What features does Ruby have that likely have a Lisp heritage?

+10  A: 

This is a good read: http://www.randomhacks.net/articles/2005/12/03/why-ruby-is-an-acceptable-lisp

And lambdas are a direct parallel: http://snippets.dzone.com/posts/show/6770

Noah
+2  A: 

Lambdas, continuations and list comprehensions are probably the top three.

Meredith L. Patterson
list comprehensions? how do i do those in ruby? ;)
banister
http://www.ruby-forum.com/topic/89416 has a few ways. Not as pretty as Python's, but they're there.
Meredith L. Patterson
Those aren't list comprehensions as the term is normally used. They're methods that operate on the list with a lambda. Which is still a lispy thing to do — they're just not list comprehensions.
Chuck
There are no first class continuations in Lisp. They are in Scheme, which is a variant of Lisp.
Vijay Mathew
There are no list comprehensions in Lisp, either, unless you count the LOOP macro of Common Lisp. (Or one of the innumerable comprehension macros that everybody writes themselves.) I think you mean "Higher order functions".
Nathan Sanders
Vijay: Scheme is-a Lisp.
Ken