Skip to main content

Scala

Main language features

  • Higher-Order Functions: Functions can be passed as arguments or returned
  • Extensions: Adds methods to existing types without modifying them
  • Pattern Matching: Expressive matching mechanism (includes collection pattern matching)
  • Given/Using: Dependency injection-like behavior
  • Opaque types: Strong type aliases
  • Union Types: Compose/allow different types
  • Inline Functions: Compile-time optimizations by replacing function calls with their definitions
  • Currying: Transforming a function with multiple parameters into a sequence of functions, each taking a single parameter

Also check