3 ms·
Why are there more comments than code in the source? Is this usual to Scala?
by xutopia 15y ago
Why are there more comments than code in the source? Is this usual to Scala?
- jimmyjazz14 15y agoScala 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).
- eru 15y agoFor 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 http://www.literateprogramming.com/adventure.pdf
- snprbob86 15y agoI 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 :-)
- Xavi 15y agoPresumably the code snippets are meant for beginners who need/appreciate more verbose comments.