|
|
|
|
|
by zylepe
2261 days ago
|
|
I’ve been using Scala as my main programming language for over 5 years. I’ve found my “plateau of enlightenment” by sticking to a subset of the features: case classes, for comprehensions, futures, immutability, pattern matching. By avoiding things like implicit, overly complex types, defining/overloading operators, and being dogmatic about FP/OOP I find the language stays out of your way and lets you write code that reads like what you’re trying to do. |
|
My advice:
- Options, immutability, pattern matching, and list comprehensions are all awesome and better than the default Javaesque way
- Scala concurrency abstractions all better than Java, but concurrency is still hard. Proceed with caution
-- Except parallel collections. Use those liberally
- No Scalaz or any other FP-crusader stuff ever
- Macros and implicits should be rejected by default in code review. Amazing justifications required
- Enforce coding rules with linters. This applies for any language, but especially important for dynamic and non-straightjacket languages