Tips on Scala
Posted on Mar 24, 2016 in Computer Science
Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.
** Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives. **
- Scala Root Package
- Scala Documentation
- Scala Tutorial
- Scala Coding Style
- Scala Glossary
- Scala Cheatsheet
- Scala Style Guide
Trick & Traps
General Tips
- IntelliJ IDEA is the recommended IDE. Eclipse (with the Scala IDE plugin) is alternative.
Style
-
avoid using break, continue, return even though you can use them in Scala
-
avoid using while loop but don't go too crazy
scala.util.Random
It is a wrapper of java.util.Random
which is NOT a high quality random number generator.
Argument Parsing
Scala Args Parsing
https://github.com/scopt/scopt
Links
http://blog.plasmaconduit.com/reduve-vs-fold-in-scala/
http://stackoverflow.com/questions/9727637/new-keyword-in-scala
Collections
http://docs.scala-lang.org/overviews/collections/overview.html
http://docs.scala-lang.org/overviews/collections/performance-characteristics.html
http://alvinalexander.com/scala/understanding-scala-collections-hierarchy-cookbook
http://stackoverflow.com/questions/19478244/how-does-a-case-anonymous-function-really-work-in-scala