Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
viraptor
· 1y ago · 0 comments
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.
Comments
[–]
kaiuhl
1y ago
But in general, ruby code only passes anonymous functions and, in those cases, the syntax is beautiful.
[–]
vidarh
1y ago
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.