Thursday, April 28, 2011

Scala Tips

"Add explicit return types to all implicits."

"Scala’s not Ruby. Scala’s not Haskell. Borrowing inspiration is good, but don’t force Scala into something it’s not."

"Prefer vals to vars. (But remember not all vars are created evil.)"

"Avoid implicit conversions that “massage” types. Prefer explicit conversions."

"Avoid case class inheritance."

"Beware initialization issues. Remember that class/trait/object bodies are constructors. (Avoid the Application trait.)"

No comments:

Post a Comment