A quick-reference guide for Scala programming
Scala is a strong statically typed JVM language that combines object-oriented and functional programming. It is widely used in big data (Apache Spark), distributed systems, and enterprise backends.
Platform JVM Paradigm OOP + Functional Typing Static, Inferred
val — immutable bindingvar — mutable bindinglazy val — evaluated on first accessList, Map, Set, Vector
ArrayBuffer, HashMapmap, filter, flatMap, reduce,
folddef add(x: Int)(y: Int) = x + ymatch / casecase class — immutable data with equals/hashCode/copysealed trait for algebraic data typesOption[T] — Some(x) | NoneEither[L, R] — Left | Right for error handlingTry[T] — Success | Failure| Category | Framework / Tool |
|---|---|
| Big Data | Apache Spark |
| Streaming | Akka Streams, Apache Kafka + Akka |
| Web | Play Framework, http4s, ZIO HTTP |
| Concurrency | Akka Actors, ZIO, Cats Effect |
| Testing | ScalaTest, Specs2, MUnit |
| Build | sbt, Mill |