I think that something is first-class if you can store it in a variable.
In Ruby, you can store a class in a variable, so it is first-class. So,
a method/function in Ruby is not first class:
a_func = def
puts 'hi'
end
Does not work. In Javascript, functions are first-class:
a_func = function (){
alert('hi')
}
You could, offcourse, store a method in a variable with the method()
function in Ruby, but in general, functions are not first-class in Ruby.
Jules
--
Posted via http://www.ruby-forum.com/.