Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Scala _ [underscore] magic (ananthakumaran.in)
33 points by DanielRibeiro on June 17, 2011 | hide | past | favorite | 5 comments


I didn't know the last one. Nevertheless I find the mix of functions with no arguments, function values and optionnal parenthesis quite confusing syntax wise.



So _ in Scala is like $_ in Perl?


Hmm, can't remember "$_", but for scala I have a lot of bookmarks

http://lambda-the-ultimate.org/node/2808#comment-41717

main complaint about syntax: underscore as a wildcard at both the term and type level plus as a way to coerce a method into a first class function.

http://okmij.org/ftp/gengo/index.html#Scala-trace

Montagovian semantics

http://www.slideshare.net/normation/scala-dreaded

http://blog.yuvimasory.com/2010/06/uses-of-underscore-in-sca...

http://permalink.gmane.org/gmane.comp.lang.scala.user/28031

http://agileskills2.org/blog/2011/05/01/revealing-the-scala-...


Kinda, but in Scala it is more like syntatic sugar, while in Perl it is a global mutable variable.




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

Search: