Comment Re:Why is Ruby gaining such media attention? (Score 1) 108
--I want to be able to pass functions around like any other object
#Use Proc.new
p = Proc.new { } ; o.method( p )
--Not quite multi-paradigm enough for my taste (why can't I work with plain functions, for example, instead of everything's-a-method?)
# Works fine.
def hello()
print "hello world\n"
end
hello
#Use Proc.new
p = Proc.new { } ; o.method( p )
--Not quite multi-paradigm enough for my taste (why can't I work with plain functions, for example, instead of everything's-a-method?)
# Works fine.
def hello()
print "hello world\n"
end
hello