No static
, No null
, No "back doors" (logs, exceptions)
Scala | Java |
---|---|
object |
static |
$colon$colon |
List |
Functions | Example |
---|---|
nums.sortWith(_ < _) |
List(1, 3, 5, 7, 11) |
nums.sortWith(_ > _) |
List(11, 7, 5, 3, 1) |
for/yield |
- Immutable values
- Pure functions
- Functions are values
- Functional error handling
- No
class
with var =>case class
case class
, whose constructor parameters areval
by default!