News for hackers. Stuff that matters.
Re:Simply Lift by xutopia on Thursday May 26, 2011 @10:42AM (#2587882)
Why are there more comments than code in the source? Is this usual to Scala?
Re:Simply Lift by snprbob86 on Thursday May 26, 2011 @11:23AM (#2588050)
I think that this is common to any expressive language in a business setting. Small, expressive code is easier to read/write/maintain for the person who originally created it, as it matches their brain and way of thinking. However, once you encounter an ever-changing set of people who may want to consume or modify your code, you need to give people a look into how your mind works. Narratives are often much longer than normal quick remarks in comments.

Furthermore, this source is intended for educating :-)

Re:Simply Lift by Xavi on Thursday May 26, 2011 @11:25AM (#2588056)
Presumably the code snippets are meant for beginners who need/appreciate more verbose comments.
Re:Simply Lift by jimmyjazz14 on Thursday May 26, 2011 @11:09AM (#2587994)
Scala code is more verbose than Haskell or Scheme but its still pretty terse for many things, so you tend to get much more done with much less code (especially if you compare it to Java).
Re:Simply Lift by eru on Thursday May 26, 2011 @12:37PM (#2588344)
For comparision: Read Knuth's version of the Colossal Cave adventure, if you want to see a well documented C program.

http://www.literateprogramming.com/adventure.pdf