scala - Passing a method as argument without converting it to a Function -


i've read here difference between functions , methods in scala. says methods can faster functions. when passing method m argument using m _, m implicitly converted function.

  1. is performance difference significant enough ponder avoiding functions when going bottleneck in program?
  2. is there way pass method argument without converting function?

  1. kind of irrelevant 2. in general, forget performance, methods more readable function declarations. might little faster in situations compiler optimizations, but:

  2. you cannot pass method argument without converting function. method special language construct, , not object itself. must use eta-expansion convert 1 if want use object.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -