PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

Scala

Scala

Scala is a pl created in 2004 by Martin Odersky.

#21on PLDB 18Years Old 139.5kUsers
130Books 26Papers 219kRepos

Try now: Web · Riju · TIO

Scala ( SKAH-lah) is a general-purpose programming language providing support for functional programming and a strong static type system. Designed to be concise, many of Scala's design decisions aimed to address criticisms of Java. Scala source code is intended to be compiled to Java bytecode, so that the resulting executable code runs on a Java virtual machine. Read more on Wikipedia...


Example from Compiler Explorer:
// Type your code here, or load an example. object Square { def square(num: Int): Int = num * num }
Example from Riju:
println("Hello, world!")
Example from hello-world:
object HelloWorld extends App { println("Hello World") }
Example from the Hello World Collection:
// Hello world in Scala object HelloWorld extends App { println("Hello world!") }
Example from Linguist:
#!/bin/sh exec scala "$0" "$@" !# object HelloWorld { def main(args: Array[String]) { println("Hello, world!") } }
Example from Wikipedia:
val urls = List("http://scala-lang.org", "https://github.com/scala/scala") def fromURL(url: String) = scala.io.Source.fromURL(url) .getLines().mkString("\n") val t = System.currentTimeMillis() urls.par.map(fromURL(_)) println("time: " + (System.currentTimeMillis - t) + "ms")

Keywords in Scala

abstract case catch class def do else extends false final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try true type val var while with yield

Language features

Feature Supported Example Token
Conditionals
Inheritance
Functions
Exceptions
Classes
While Loops
Booleans true false
MultiLine Comments
/* A comment
*/
/* */
Print() Debugging println
Message Passing
Line Comments
// A comment
//
Operator Overloading
Implicit Arguments
// https://docs.scala-lang.org/tour/implicit-parameters.html
abstract class Monoid[A] {
  def add(x: A, y: A): A
  def unit: A
}

object ImplicitTest {
  implicit val stringMonoid: Monoid[String] = new Monoid[String] {
    def add(x: String, y: String): String = x concat y
    def unit: String = ""
  }
  
  implicit val intMonoid: Monoid[Int] = new Monoid[Int] {
    def add(x: Int, y: Int): Int = x + y
    def unit: Int = 0
  }
  
  def sum[A](xs: List[A])(implicit m: Monoid[A]): A =
    if (xs.isEmpty) m.unit
    else m.add(xs.head, sum(xs.tail))
    
  def main(args: Array[String]): Unit = {
    println(sum(List(1, 2, 3)))       // uses intMonoid implicitly
    println(sum(List("a", "b", "c"))) // uses stringMonoid implicitly
  }
}
Comments
Partial Application
def add(x: Int, y: Int) = {x+y}; add(1, _: Int)
Strings
"hello world"
"
Semantic Indentation ϴ

Books about Scala on goodreads

title author year reviews ratings rating
Programming in Scala Martin Odersky 2008 87 1325 4.19
Functional Programming in Scala Rúnar Bjarnason 2013 45 486 4.44
Programming Scala Venkat Subramaniam 2009 10 100 3.29
Programming Scala: Scalability = Functional Programming + Objects Dean Wampler 2009 21 204 3.68

Books about Scala from ISBNdb

title authors year publisher
Programming in Scala: Updated for Scala 2.12 Odersky, Martin and Spoon, Lex and Venners, Bill 2016 Artima Press
Functional Programming in Scala Paul Chiusano and Rúnar Bjarnason 2014 Manning Publications
Introduction to the Art of Programming Using Scala (Chapman & Hall/CRC Textbooks in Computing) Lewis, Mark C. 2012 Chapman and Hall/CRC
Scala High Performance Programming Theron, Vincent and Diamant, Michael 2016 Packt Publishing
Scala Cookbook: Recipes for Object-Oriented and Functional Programming Alexander, Alvin 2013 O'Reilly Media
Programming in Scala Martin Odersky and Spoon, Lex and Venners, Bill 2020 Artima Inc
Scala Functional Programming Patterns S.Khot, Atul 2015 Packt Publishing
Scala for Data Science: Leverage the power of Scala with different tools to build scalable, robust data science applications Bugnion, Pascal 2016 Packt Publishing
Functional Programming Patterns in Scala and Clojure: Write Lean Programs for the JVM Bevilacqua-Linn, Michael 2013 Pragmatic Bookshelf
Beginning Scala (Expert's Voice in Open Source) Pollak, David 2009 Apress
Scala Reactive Programming: Build scalable, functional reactive microservices with Akka, Play, and Lagom Posa, Rambabu 2018 Packt Publishing
Beginning Scala David Pollak 20091001 Springer Nature
Learning Concurrent Programming in Scala Prokopec, Aleksandar 2014 Packt Publishing
Programming Scala Dean Wampler 20141204 O'Reilly Media, Inc.
Programming with Scala Bhim P. Upadhyaya 20171017 Springer Nature
Scala and Spark for Big Data Analytics: Explore the concepts of functional programming, data streaming, and machine learning Karim, Md. Rezaul and Alla, Sridhar 2017 Packt Publishing
Programming in Scala Fifth Edition Odersky and Martin and Spoon and Lex and Venners and Bill and Sommers and Frank 2021 Artima Press
Scala for the Impatient S., Horstmann Cay 2016 Addison-Wesley Professional
Functional Programming in Scala Chiusano , Paul and Bjarnason, Runar 2014 Manning
Scala Cookbook: Recipes for Object-Oriented and Functional Programming Alexander, Alvin 2021 O'Reilly Media
Hands-on Scala Programming: Learn Scala in a Practical, Project-Based Way Li, Haoyi 2020 Li Haoyi
Scala for Machine Learning Nicolas, Patrick R. 2014 Packt Publishing
Scala for the Impatient S., Horstmann Cay 2012 Addison-Wesley Professional
Scala for the Impatient Horstmann, Cay 2010 Addison-Wesley Professional
Hands-On Data Analysis with Scala: Perform data collection, processing, manipulation, and visualization with Scala Gupta, Rajesh 2019 Packt Publishing
100+ Frequently Asked Interview Questions & Answers In Scala: Scala Programming (Interview Q & A Series) Ojha, Bandana 2018-05-24T00:00:01Z Independently published
Scala Design Patterns: Design modular, clean, and scalable applications by applying proven design patterns in Scala, 2nd Edition Nikolov, Ivan 2018 Packt Publishing
Learning Concurrent Programming in Scala Prokopec, Aleksandar 2014 Packt Publishing
Hands-On Data Analysis with Scala: Perform data collection, processing, manipulation, and visualization with Scala Gupta, Rajesh 2019 Packt Publishing
Object-Orientation, Abstraction, and Data Structures Using Scala (Chapman & Hall/CRC Textbooks in Computing) Lewis, Mark C. and Lacher, Lisa L. 2017 Chapman and Hall/CRC
Get Programming with Scala Sfregola, Daniela 2021 Manning Publications
Introduction to Programming and Problem-Solving Using Scala (Chapman & Hall/CRC Textbooks in Computing Book 19) Lewis, Mark C. and Lacher, Lisa 2016 Chapman and Hall/CRC
Scala in Action: Covers Scala 2.10 Nilanjan Raychaudhuri 2013 Manning Publications
Learning Concurrent Programming in Scala - Second Edition Prokopec, Aleksandar 2017 Packt Publishing
Scala High Performance Programming Theron, Vincent and Diamant, Michael 2016 Packt Publishing
Scala Design Patterns Nikolov, Ivan 2016 Packt Publishing
Scala Programming for Big Data Analytics: Get Started With Big Data Analytics Using Apache Spark Elahi, Irfan 2019-07-06T00:00:01Z Apress
Beginning Scala Layka, Vishal and Pollak, David 2015 Apress
Modern Systems Programming with Scala Native: Write Lean, High-Performance Code without the JVM Whaling, Richard 2020-02-11T00:00:01Z Pragmatic Bookshelf
Scala Data Analysis Cookbook Manivannan, Arun 2015 Packt Publishing
RESTful Web Services with Scala Dirksen, Jos 2015 Packt Publishing
Scala Design Patterns Nikolov, Ivan 2016 Packt Publishing
Introduction to Programming and Problem-Solving Using Scala (Chapman & Hall/CRC Textbooks in Computing Book 19) Lewis, Mark C. and Lacher, Lisa 2016 Chapman and Hall/CRC
Scala and Spark for Big Data Analytics: Explore the concepts of functional programming, data streaming, and machine learning Karim, Md. Rezaul and Alla, Sridhar 2017-07-25T00:00:01Z Packt Publishing
Learn Scala Programming: A comprehensive guide covering functional and reactive programming with Scala 2.13, Akka, and Lagom Schmidt, Slava 2018 Packt Publishing
Professional Scala Bogucki, Janek and Lacava, Alessandro and Bedrytski, Aliaksandr and de Detrich, Matthew and Neil, Benjamin 2016 Wrox
Building a Recommendation Engine with Scala Ansari, Saleem 2016 Packt Publishing
Scala for Machine Learning Nicolas, Patrick R. 2014 Packt Publishing
Scala Programming Projects: Build real world projects using popular Scala frameworks like Play, Akka, and Spark Valot, Mikael and Jorand, Nicolas 2018 Packt Publishing
Scala for Java Developers Alexandre, Thomas 2014 Packt Publishing
Practical Apache Spark: Using the Scala API Chellappan, Subhashini and Ganesan, Dharanitharan 2018 Apress
Mastering Functional Programming: Functional techniques for sequential and parallel programming with Scala Kmetiuk, Anatolii 2018 Packt Publishing
Learn Scala Programming: A comprehensive guide covering functional and reactive programming with Scala 2.13, Akka, and Lagom Schmidt, Slava 2018-10-31T00:00:01Z Packt Publishing
Mastering Scala Machine Learning Kozlov, Alex 2016 Packt Publishing
Actors in Scala Haller, Philipp and Sommers, Frank 2012 Artima Inc
Practical Scala DSLs: Real-World Applications Using Domain Specific Languages Riti, Pierluigi 2017 Apress
Scala programming: Learn Scala Programming FAST and EASY! (Programming is Easy) (Volume 11) Gimson, Matthew 2016-10-16T00:00:01Z CreateSpace Independent Publishing Platform
Atomic Scala - learn programming in the language of the future Bruce Eckel, Dianne Marsh 2013T
Scientific Computing with Scala Jancauskas, Vytautas 2016 Packt Publishing
Modern Scala Projects: Leverage the power of Scala for building data-driven and high-performant projects Gurusamy, Ilango 2018 Packt Publishing
Scala Design Patterns: Patterns for Practical Reuse and Design Hunt, John 2013 Springer
RESTful Web Services with Scala Dirksen, Jos 2015 Packt Publishing
Scala Design Patterns: Patterns for Practical Reuse and Design Hunt, John 2013 Springer
Learning Scala Programming: Object-oriented programming meets functional reactive to create Scalable and Concurrent programs Sharma, Vikash 2018-01-30T00:00:01Z Packt Publishing
Reactive Programming with Scala and Akka Prasanna Kumar Sathyanarayanan 2016-02-29 Packt Publishing - ebooks Account
Scala programming: Learning Scala fast! Archer, Ralph 2015 CreateSpace Independent Publishing Platform
XML Processing with Scala (Programming with Scala) Upadhyaya, Bhim 2017-09-18T00:00:01Z Independently published
A taste of Functional Programming in Scala Mandal, Malay 2017-05-29T00:00:01Z CreateSpace Independent Publishing Platform
Lift Cookbook: Recipes from the Community for Building Web Applications with Scala Dallaway, Richard 2013 O'Reilly Media
Introduction to the Art of Programming Using Scala Lewis, Mark C. 2017-07-27T00:00:01Z Chapman and Hall/CRC
Functional Programming In Scala Chiusano Bjarnason 2015 Dreamtech Press India
Scala programming combat(Chinese Edition) Alvin Alexander ZHU 2016 Machinery Industry Press
Learn Scala For Java Developers Toby Weston 2015 Createspace
Modern Systems Programming with Scala Native Richard Whaling 20200123 O'Reilly Media, Inc.
Concurrent Application Development Using Akka With Scala Meetu Maltiar and Vikas Hazrati 2015 Apress
Scala Programming (4th Edition) (by The Blog Post)(chinese Edition) [ De ] Martin Odersky ( Ma Ding · Ao De Si Ji ) , Lex Spoon ( Lai Si · Peng ) , Bill Venners ( Bi Er · Wen Na Si ) , Gao Yu Xiang Yi Electronic Industry Press
Scala Cookbook Alvin Alexander 20130801 O'Reilly Media, Inc.
Programming Scala Dean Wampler; Alex Payne 20090915 O'Reilly Media, Inc.
Scala Microservices Jatin Puri and Selvam Palanimalai 2017-09-19 Packt Publishing
Professional Scala Nimish Narang
Programming Scala Dean Wampler; Alex Payne 20141204 O'Reilly Media, Inc.
Scala Cookbook Alvin Alexander 20210810 O'Reilly Media, Inc.
Learning Scala Jason Swartz 20141211 O'Reilly Media, Inc.
Scala Cookbook Alvin Alexander 20130801 O'Reilly Media, Inc.
Programming Scala Dean Wampler 20210526 O'Reilly Media, Inc.
Professional Scala Mads Hartmann; Ruslan Shevchenko 31-07-2018 Packt Publishing
Learning Scala Jason Swartz 20141211 O'Reilly Media, Inc.
Play for Scala Peter Hilton; Erik Bakker 20131003 Simon & Schuster
Testing in Scala Daniel Hinojosa 20130124 O'Reilly Media, Inc.
Scala (programming Language) Surhone and Lambert M. and Timpledon and Miriam T. and Marseken and Susan F. 2010
Concurrency in Scala Marvin Hansen 2016-09-15 LAP LAMBERT Academic Publishing
Learning Scala Programming Vikash Sharma 30-01-2018 Packt Publishing
Scala in Depth Josh Suereth 20120513 Simon & Schuster
Scala in Action Nilanjan Raychaudhuri 20130408 Simon & Schuster
Steps in Scala Christos K. K. Loverdos; Apostolos Syropoulos 20100923 Cambridge University Press
Scala Reactive Programming Rambabu Posa 28-02-2018 Packt Publishing
Modern Scala Projects Ilango gurusamy 30-07-2018 Packt Publishing
Beginning Scala 3 David Pollak; Vishal Layka; Andres Sacco 20220125 Springer Nature
Testing in Scala Daniel Hinojosa 20130124 O'Reilly Media, Inc.
Scala Programming Projects Mikael Valot; Nicolas Jorand 29-09-2018 Packt Publishing
Practical Fp In Scala Gabriel Volpe 2020
Scala for Java Developers Toby Weston 20171212 Springer Nature
Get Programming with Scala Daniela Sfregola 20211005 Simon & Schuster
Building Applications with Scala Diego Pacheco 2016-12-08 Packt Publishing
Scientific Computing with Scala Vytautas Jancauskas 27-04-2016 Packt Publishing
Scala for Data Science Pascal Bugnion 28-01-2016 Packt Publishing
Mastering Scala Machine Learning Alex Kozlov 28-06-2016 Packt Publishing
Scala Functional Programming Patterns Atul S. Khot 29-12-2015 Packt Publishing
Building Applications with Scala Diego Pacheco 2016-12-08 Packt Publishing
Scala for Java Developers Thomas Alexandre 20140425 Packt Publishing
Scala Machine Learning Projects Md. Rezaul Karim 31-01-2018 Packt Publishing
Scala Tutorials: Computer Programming Language Scala Tutorials To Learn The Easy Way! Nitin Kanani 2019 Independently Published
Scala For Spark In Production Alexy Khrabrov and Andy Petrella and Xavier Tordoir 2017 O'Reilly Media, Incorporated
Scala Programming: Learn Scala Programming Fast And Easy! (programming Is Easy) (volume 11) Matthew Gimson 2015-11-12 Createspace Independent Publishing Platform
Learning Concurrent Programming in Scala Aleksandar Prokopec 22-02-2017 Packt Publishing
Mastering Play Framework for Scala Shiti Saxena 20150529 Packt Publishing
Scala for Machine Learning - Second Edition Patrick R. Nicolas 26-09-2017 Packt Publishing
Data Structures and Algorithms with Scala Bhim P. Upadhyaya 20190226 Springer Nature
Building a Recommendation Engine with Scala Saleem Ansari 2016-01-05 Packt Publishing
Reactive Programming with Scala and Akka Prasanna Kumar Sathyanarayanan 2016-02-29 Packt Publishing
Scala Programming for Big Data Analytics Irfan Elahi 20190705 Springer Nature
Machine Learning with Scala Quick Start Guide Md. Rezaul Karim 30-04-2019 Packt Publishing
Introduction to Programming and Problem-Solving Using Scala Mark C. Lewis 20160826 CRC Press
Introduction to the Art of Programming Using Scala Mark C. Lewis 20121105 Taylor & Francis
Object-Orientation, Abstraction, and Data Structures Using Scala Mark C. Lewis; Lisa L. Lacher 20170106 Taylor & Francis
Introduction to the Art of Programming Using Scala Mark C. Lewis 20121105 Taylor & Francis

Publications about Scala from Semantic Scholar

title authors year citations influentialCitations
Chisel: Constructing hardware in a Scala embedded language J. Bachrach and H. Vo and B. Richards and Yunsup Lee and Andrew Waterman and R. Avizienis and J. Wawrzynek and K. Asanović 2012 597 85
Unifying functional and object-oriented programming with Scala Martin Odersky and Tiark Rompf 2014 50 6
Scala to the Power of Z3: Integrating SMT and Programming A. Köksal and Viktor Kuncak and Philippe Suter 2011 40 0
Closing the Gap Between Specification and Programming: VDM++ and Scala K. Havelund 2011 12 3
Named and default arguments for polymorphic object-oriented languages: a discussion on the design implemented in the Scala language Lukas Rytz and Martin Odersky 2010 7 0
Lightweight Session Programming in Scala (Artifact) A. Scalas and N. Yoshida 2016 6 0
A scalable infrastructure for teaching concepts of programming languages in Scala with WebLab: an experience report T. V. D. Lippe and Thomas Smith and Daniël A. A. Pelsmaeker and E. Visser 2016 4 0
Introduction to the Art of Programming Using Scala Mark C. Lewis 2017 4 0
The Scala Language T. Weston 2018 4 1
Scalagna 0.1: towards multi-tier programming with Scala and Scala.js Bob Reynders and Michael Greefs and D. Devriese and F. Piessens 2018 4 0
Scala implicits are everywhere: a large-scale study of the use of Scala implicits in the wild Filip Krikava and H. Miller and J. Vitek 2019 3 1
What are the Odds?: probabilistic programming in Scala Sandro Stucki and Nada Amin and Manohar Jonnalagedda and Tiark Rompf 2013 3 0
Integrated Modeling and Development of Component-Based Embedded Software in Scala K. Havelund and R. Bocchino 2021 3 0
Associated types and constraint propagation for generic programming in Scala Artem Pelenitsyn 2015 3 0
Distributed programming in Scala with APGAS Philippe Suter and O. Tardieu and Josh Milthorpe 2015 2 1
Scowl: a Scala DSL for programming with the OWL API J. Balhoff 2016 2 0
Towards an agent-oriented programming language based on Scala Dejan Mitrovic and M. Ivanović and Z. Budimac 2012 2 0
Implementing a Language for Distributed Systems: Choices and Experiences with Type Level and Macro Programming in Scala P. Weisenburger and G. Salvaneschi 2020 2 0
Extension of scala language by distributed and parallel computing tools with Linda coordination system M. Glybovets and S. S. Gorohovskiy and M. S. Stukalo 2010 1 0
A tool written in Scala for preparation and analysis in MD simulation and 3D-RISM calculation of biomolecules I. Onishi and Hiroto Tsuji and M. Irisa 2019 1 0
Hybrid Taint Flow Analysis in Scala Mohammadreza Ashouri and C. Kreitz 2019 1 0
Kaizen: a scalable concolic fuzzing tool for Scala Mohammadreza Ashouri 2020 1 0
A Study of Big Data Analytics using Apache Spark with Python and Scala Y. Gupta and Surbhi Kumari 2020 1 0
Programming in Scala M. Guller 2015 1 0
Programming Behavioral Test Models for SMT Solving in Scala B. Aichernig and Benedikt Maderbacher and Stefan Tiran 2019 1 0
Implementation of a MIX Emulator: A Case Study of the Scala Programming Language Facilities R. Batdalov and O. Ņikiforova 2017 1 0
swift.html · scala.html · css.html

View source

PLDB - Build the next great programming language · v2022 · Day 29 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com