Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It comes with the downside that if you want to pass the function itself around, you need to do f=something.method(:the_function), and then f.call(args). It's not a huge deal, but... meh.


But in general, ruby code only passes anonymous functions and, in those cases, the syntax is beautiful.


You might know this, but you can also do f.(args) or f[args] in the latter case. It's still a bit meh, but slightly less verbose.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: