Site menu

CodeCook.io

  • Languages
    • C
    • C++
    • CSS
    • Git
    • HTML
    • Java
    • JavaScript
    • jQuery
    • PHP
    • Python
    • Ruby
    • Scala

Scala - recipes

  • {{ item.name }}
  • Append item to array
  • Apply function to list
  • Array length
  • Block comment
  • Break out of loop
  • Concatenate two arrays
  • Counter loop
  • Do loop while a condition is true
  • Find index of item in array
  • For each loop
  • Function
  • Function default parameter
  • Get first element array
  • Increment variable by one
  • Inline conditional
  • Loop until condition is true
  • Loop while condition is true
  • Repeat string
  • Reverse string
  • Single comment
  • Sort list of numbers
  • String concatenation
  • String length
  • String to lowercase
  • String to uppercase
  • Switch
Scala logo

Scala

language type
mix of functional and object oriented

Scala is an acronym for “Scalable Language”. This means that Scala grows with you. You can play with it by typing one-line expressions and observing the results. But you can also rely on it for large mission critical systems, as many companies, including Twitter, LinkedIn, or Intel do.

To some, Scala feels like a scripting language. Its syntax is concise and low ceremony; its types get out of the way because the compiler can infer them. There’s a REPL and IDE worksheets for quick feedback. Developers like it so much that Scala won the ScriptBowl contest at the 2012 JavaOne conference.

At the same time, Scala is the preferred workhorse language for many mission critical server systems. The generated code is on a par with Java’s and its precise typing means that many problems are caught at compile-time rather than after deployment.

At the root, the language’s scalability is the result of a careful integration of object-oriented and functional language concepts. -www.scala-lang.org

  • Blog
  • About
  • License