SlideShare a Scribd company logo
The Scala Programming
Language: An Overview
The perfect blend of object-oriented and
functional programming makes for great
scalability.
Patrick Walter
1/29/2016
Programming languages come in many different shapes and sizes. Sometimes they are
designed for a particular application and other times they are made to be a general purpose
language fit for many applications. A programming languages’ paradigm is the fundamental
style of the language which also sometimes defines the capabilities of the language. Peter Van
Roy formally defines a programming paradigm as “an approach to programming a computer
based on a mathematical theory or a coherent set of principles.” (Van Roy, n.d.) While some
languages follow one paradigm, many tend to support multiple paradigms. Almost all
programming languages fall under four main paradigms. The four main programming
paradigms are imperative, functional, logical, and object-oriented. (Nørmark, 2013) An
interesting example of a language that supports multiple programming paradigms is Scala
Programming Language. Scala is a functional object-oriented language which runs on the Java
Virtual Machine and was developed at the Programming Methods Laboratory at École
Polytechnique Fédérale de Lausanne. Scala is a highly functional, scalable, and multifaceted
programming language with many strengths and weaknesses.
Unlike Java and C#, Scala is a purely object-oriented language. By definition, this means
that every value is an object and every operation is a message send. (Odersky, et al., 2006)
Being an object- oriented language, Scala uses a class hierarchy that has a root of Scala.Any
and then splits into two main types, value classes and reference classes. Reference classes are
represented by pointers and value classes are represented directly in memory with any need
for dereference. (Odersky, et al., 2006) As mentioned before, part of this unified object model
includes the notion that all operations are message sends, meaning that they invoke a method.
While many operations in Scala are predefined there is the ability to create user-defined
operations or enhance predefined library operations. (Odersky, et al., 2006) Alone these
attributes of Scala make it very similar to many object-oriented languages such as Java, which it
can actually seamlessly interact with. (Odersky, et al., 2006) However, unlike Java, Scala is also a
fully functional language. All operations in Scala are values. This means that functions, or
methods, can be passed as parameters to other functions or returned as a result. This also
means that all functions are objects since all values in Scala are objects and functions
themselves are values. (Odersky, et al., 2006) The combination of these concepts makes an
easily scalable language, as described by Scala’s developers, “The two programming styles have
complementary strengths when it comes to scalability. Scala’s functional programming
constructs make it easy to build interesting things quickly from simple parts. Its object-oriented
constructs make it easy to structure larger systems and to adapt them to new demands.”
(Odersky, Spoon, & Veners, Scala:A Scalable Language, 2008)
The name for Scala comes from “scalable language”, which means that it is a language
that is designed to not only grow on the users but to grow with the users. (Odersky, Spoon, &
Veners, Scala:A Scalable Language, 2008) From small single user applications, to massive critical
mission applications, Scala is designed to be a versatile language for varying sized systems and
applications. Recently Scala has become increasing important in many big data systems and
projects that use Apache’s Spark and Kafka which are used by companies like Twitter and
LinkedIn. (Mesophere, 2015) However the idea of Scala as a growing language is not only in
terms of its size. Scala is a language that the user may actively adapt and extend to fit their
every need. For example, Scala uses associative maps that are common in scripting languages
but these however these maps are not in the languages syntax. Scala uses library abstractions
to control concepts like associative maps so that they can be extended and adapted by the
user. (Odersky, Spoon, & Veners, 2008) It also supports implicits, operator overloading, and the
ability to enhance libraries of existing methods and classes. (Odersky, et al., 2006)
As mentioned before Scala is similar to the Java Programming Language, so much so
that Java code can be executed within Scala as they both run on the Java Virtual Machine. In
comparison to Java, Scala has a very straightforward and simple syntax. This allows for
significantly less code that is even more human-readable. Inherently immutable objects in Scala
alleviate many thread-safety concerns and its functional paradigm allows for highly functional
programs to be used to implement applications that need to concurrency since all functions are
side effect free. (Ulrich, 2012) While the multi-paradigm versatility and scalability of Scala can
offer many benefits it comes with some costs. Although it’s not a result of the language itself,
the lack of community presence is a downside of all new languages. (Ulrich, 2012) However, if
Scala proves itself to be useful asset its community of experts and followers will grow with time.
Scala is a build to be scalable and adaptable which also has some downsides. In Scala there are
often many ways to do the same thing. The ability to overload operators or enhance or adapt
library methods and classes gives the designer lots of flexibility, it creates many places for
things to go wrong and may create code that is hard to read, trace, and debug. (Moore, 2011)
Due to this perfect blend of two very different programming paradigms, Scala has the
potential to compete with more mainstream object-oriented languages such as Java and C#, or
scripting languages such as Python. In the words of its developers, Scala allows you to
“Construct elegant class hierarchies for maximum code reuse and extensibility, implement their
[behaviour] using higher-order functions. Or anything in-between.” (Scala, n.d.) Scala’s
scalability has be recently getting more recognition in the world of big data to pipeline data
between different points in big data system in many popular social media platforms such as
Twitter and LinkedIn or to be used to control cluster based systems. At the 2012 JavaOne
conference, Scala won the ScriptBowl conference as many developers like its scripting
capabilities. (Odersky, What is Scala, n.d.) Many believe that as Scala becomes more widely
used it will be a valuable asset in a wide variety of applications.
References
Function, O.-O. M. (n.d.). Scala. Retrieved January 29, 2016, from Scala: http://www.scala-
lang.org/index.html
Mesophere, C. (2015, July 24). Learn Everything You Need To Know About Scala And Big Data. Retrieved
January 28, 2015, from Mesophere: https://mesosphere.com/blog/2015/07/24/learn-everything-you-
need-to-know-about-scala-and-big-data-in-oakland/
Moore, J. (2011, September 8). What are the downsides of Scala as a programming language? Retrieved
Janurary 29, 2016, from Quora: https://www.quora.com/What-are-the-downsides-of-Scala-as-a-
programming-language/answer/Justin-Moore
Nørmark, K. (2013, July 2). Aalborg University. Retrieved January 29, 2016, from Overview of the four
main programming paradigms: http://people.cs.aau.dk/~normark/prog3-
03/html/notes/paradigms_themes-paradigm-overview-section.html
Odersky, M. (n.d.). What is Scala. Retrieved January 29, 2016, from Scala: http://www.scala-
lang.org/what-is-scala.html
Odersky, M., Altherr, P., Cremet, V., Dragos, I., Dubochet, G., Emir, B., et al. (2006). An Overview of the
Scala Programming Language. Lausanne, Switzerland: Ecole Polytechnique Federale de Lausanne.
Odersky, M., Spoon, L., & Veners, B. (2008, May 6). Scala:A Scalable Language. Retrieved January 27,
2016, from Artima Developer: http://www.artima.com/scalazine/articles/scalable-language.html
Ulrich, H. (2012, October 23). Pros & Cons of Scala Programming for Agile Software Development.
Retrieved January 29, 2016, from Celerity: http://blog.celerity.com/pros-cons-scala
Van Roy, P. (n.d.). Programming Paradigms for Dummies: What Every Programmer Should Know.
Retrieved January 29, 2016, from Institute of Information and Communications and Communication
Technologies, Electronics and Applied Mathematics:
https://www.info.ucl.ac.be/~pvr/VanRoyChapter.pdf

More Related Content

Viewers also liked (11)

DOCX
Skelton Resume
Kim Skelton
 
PDF
Roberta-Nimmons
Roberta Nimmons
 
PDF
Wilson, Allie Resume
Allie Wilson
 
PPTX
DERECHO AGRARIO
ABELIS PERAZA
 
PDF
Detecting Vulnerable Plaques with Multiresolution Analysis
Sushma Srinivas
 
PPTX
Blog - Informações
Matheus Santos Diniz
 
PPTX
Rompimento da barragem em mariana
Ana Claudia De Oliveira
 
PDF
EZ Pass
Marco Coghi
 
PPTX
Projeto Caixa Forte
Marco Coghi
 
DOCX
My Resume 2016
Alabama Gio
 
DOCX
Pamela J Resume_updated 3_16
Pam Lock
 
Skelton Resume
Kim Skelton
 
Roberta-Nimmons
Roberta Nimmons
 
Wilson, Allie Resume
Allie Wilson
 
DERECHO AGRARIO
ABELIS PERAZA
 
Detecting Vulnerable Plaques with Multiresolution Analysis
Sushma Srinivas
 
Blog - Informações
Matheus Santos Diniz
 
Rompimento da barragem em mariana
Ana Claudia De Oliveira
 
EZ Pass
Marco Coghi
 
Projeto Caixa Forte
Marco Coghi
 
My Resume 2016
Alabama Gio
 
Pamela J Resume_updated 3_16
Pam Lock
 

Similar to Scala Overview INFX 1616 (20)

PDF
Selling Scala to your boss
João Bernardino
 
PPTX
Scala adoption by enterprises
Mike Slinn
 
PDF
Scala Programming A comprehensive beginner s guide to Scala 2nd Edition Claud...
hakeshametwp
 
PPTX
Introduction to Scala
Mohammad Hossein Rimaz
 
PPTX
Scala-Ls1
Aniket Joshi
 
PDF
Yes scala can!
amirmoulavi
 
PDF
Scala, Akka, and Play: An Introduction on Heroku
Havoc Pennington
 
ODP
A Tour Of Scala
fanf42
 
PDF
A Brief, but Dense, Intro to Scala
Derek Chen-Becker
 
PDF
Programming Scala 3rd Edition Dean Wampler Dean Wampler
absovgleni
 
PPTX
Scala for n00bs by a n00b.
brandongulla
 
PPTX
An Introduction to Scala
Brent Lemons
 
PDF
Quick introduction to scala
Mohammad Hossein Rimaz
 
PDF
Software Engineering Thailand: Programming with Scala
Brian Topping
 
PDF
BCS SPA 2010 - An Introduction to Scala for Java Developers
Miles Sabin
 
PDF
An Introduction to Scala for Java Developers
Miles Sabin
 
PDF
Scala and jvm_languages_praveen_technologist
pmanvi
 
PPTX
Introduction to scala for a c programmer
Girish Kumar A L
 
PDF
Programming in Scala - Lecture One
Angelo Corsaro
 
PDF
Get Programming with Scala MEAP V05 Daniela Sfregola
biruktresehb
 
Selling Scala to your boss
João Bernardino
 
Scala adoption by enterprises
Mike Slinn
 
Scala Programming A comprehensive beginner s guide to Scala 2nd Edition Claud...
hakeshametwp
 
Introduction to Scala
Mohammad Hossein Rimaz
 
Scala-Ls1
Aniket Joshi
 
Yes scala can!
amirmoulavi
 
Scala, Akka, and Play: An Introduction on Heroku
Havoc Pennington
 
A Tour Of Scala
fanf42
 
A Brief, but Dense, Intro to Scala
Derek Chen-Becker
 
Programming Scala 3rd Edition Dean Wampler Dean Wampler
absovgleni
 
Scala for n00bs by a n00b.
brandongulla
 
An Introduction to Scala
Brent Lemons
 
Quick introduction to scala
Mohammad Hossein Rimaz
 
Software Engineering Thailand: Programming with Scala
Brian Topping
 
BCS SPA 2010 - An Introduction to Scala for Java Developers
Miles Sabin
 
An Introduction to Scala for Java Developers
Miles Sabin
 
Scala and jvm_languages_praveen_technologist
pmanvi
 
Introduction to scala for a c programmer
Girish Kumar A L
 
Programming in Scala - Lecture One
Angelo Corsaro
 
Get Programming with Scala MEAP V05 Daniela Sfregola
biruktresehb
 
Ad

Recently uploaded (20)

PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Complete Network Protection with Real-Time Security
L4RGINDIA
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Complete Network Protection with Real-Time Security
L4RGINDIA
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Ad

Scala Overview INFX 1616

  • 1. The Scala Programming Language: An Overview The perfect blend of object-oriented and functional programming makes for great scalability. Patrick Walter 1/29/2016
  • 2. Programming languages come in many different shapes and sizes. Sometimes they are designed for a particular application and other times they are made to be a general purpose language fit for many applications. A programming languages’ paradigm is the fundamental style of the language which also sometimes defines the capabilities of the language. Peter Van Roy formally defines a programming paradigm as “an approach to programming a computer based on a mathematical theory or a coherent set of principles.” (Van Roy, n.d.) While some languages follow one paradigm, many tend to support multiple paradigms. Almost all programming languages fall under four main paradigms. The four main programming paradigms are imperative, functional, logical, and object-oriented. (Nørmark, 2013) An interesting example of a language that supports multiple programming paradigms is Scala Programming Language. Scala is a functional object-oriented language which runs on the Java Virtual Machine and was developed at the Programming Methods Laboratory at École Polytechnique Fédérale de Lausanne. Scala is a highly functional, scalable, and multifaceted programming language with many strengths and weaknesses. Unlike Java and C#, Scala is a purely object-oriented language. By definition, this means that every value is an object and every operation is a message send. (Odersky, et al., 2006) Being an object- oriented language, Scala uses a class hierarchy that has a root of Scala.Any and then splits into two main types, value classes and reference classes. Reference classes are represented by pointers and value classes are represented directly in memory with any need for dereference. (Odersky, et al., 2006) As mentioned before, part of this unified object model includes the notion that all operations are message sends, meaning that they invoke a method. While many operations in Scala are predefined there is the ability to create user-defined
  • 3. operations or enhance predefined library operations. (Odersky, et al., 2006) Alone these attributes of Scala make it very similar to many object-oriented languages such as Java, which it can actually seamlessly interact with. (Odersky, et al., 2006) However, unlike Java, Scala is also a fully functional language. All operations in Scala are values. This means that functions, or methods, can be passed as parameters to other functions or returned as a result. This also means that all functions are objects since all values in Scala are objects and functions themselves are values. (Odersky, et al., 2006) The combination of these concepts makes an easily scalable language, as described by Scala’s developers, “The two programming styles have complementary strengths when it comes to scalability. Scala’s functional programming constructs make it easy to build interesting things quickly from simple parts. Its object-oriented constructs make it easy to structure larger systems and to adapt them to new demands.” (Odersky, Spoon, & Veners, Scala:A Scalable Language, 2008) The name for Scala comes from “scalable language”, which means that it is a language that is designed to not only grow on the users but to grow with the users. (Odersky, Spoon, & Veners, Scala:A Scalable Language, 2008) From small single user applications, to massive critical mission applications, Scala is designed to be a versatile language for varying sized systems and applications. Recently Scala has become increasing important in many big data systems and projects that use Apache’s Spark and Kafka which are used by companies like Twitter and LinkedIn. (Mesophere, 2015) However the idea of Scala as a growing language is not only in terms of its size. Scala is a language that the user may actively adapt and extend to fit their every need. For example, Scala uses associative maps that are common in scripting languages but these however these maps are not in the languages syntax. Scala uses library abstractions
  • 4. to control concepts like associative maps so that they can be extended and adapted by the user. (Odersky, Spoon, & Veners, 2008) It also supports implicits, operator overloading, and the ability to enhance libraries of existing methods and classes. (Odersky, et al., 2006) As mentioned before Scala is similar to the Java Programming Language, so much so that Java code can be executed within Scala as they both run on the Java Virtual Machine. In comparison to Java, Scala has a very straightforward and simple syntax. This allows for significantly less code that is even more human-readable. Inherently immutable objects in Scala alleviate many thread-safety concerns and its functional paradigm allows for highly functional programs to be used to implement applications that need to concurrency since all functions are side effect free. (Ulrich, 2012) While the multi-paradigm versatility and scalability of Scala can offer many benefits it comes with some costs. Although it’s not a result of the language itself, the lack of community presence is a downside of all new languages. (Ulrich, 2012) However, if Scala proves itself to be useful asset its community of experts and followers will grow with time. Scala is a build to be scalable and adaptable which also has some downsides. In Scala there are often many ways to do the same thing. The ability to overload operators or enhance or adapt library methods and classes gives the designer lots of flexibility, it creates many places for things to go wrong and may create code that is hard to read, trace, and debug. (Moore, 2011) Due to this perfect blend of two very different programming paradigms, Scala has the potential to compete with more mainstream object-oriented languages such as Java and C#, or scripting languages such as Python. In the words of its developers, Scala allows you to “Construct elegant class hierarchies for maximum code reuse and extensibility, implement their
  • 5. [behaviour] using higher-order functions. Or anything in-between.” (Scala, n.d.) Scala’s scalability has be recently getting more recognition in the world of big data to pipeline data between different points in big data system in many popular social media platforms such as Twitter and LinkedIn or to be used to control cluster based systems. At the 2012 JavaOne conference, Scala won the ScriptBowl conference as many developers like its scripting capabilities. (Odersky, What is Scala, n.d.) Many believe that as Scala becomes more widely used it will be a valuable asset in a wide variety of applications.
  • 6. References Function, O.-O. M. (n.d.). Scala. Retrieved January 29, 2016, from Scala: http://www.scala- lang.org/index.html Mesophere, C. (2015, July 24). Learn Everything You Need To Know About Scala And Big Data. Retrieved January 28, 2015, from Mesophere: https://mesosphere.com/blog/2015/07/24/learn-everything-you- need-to-know-about-scala-and-big-data-in-oakland/ Moore, J. (2011, September 8). What are the downsides of Scala as a programming language? Retrieved Janurary 29, 2016, from Quora: https://www.quora.com/What-are-the-downsides-of-Scala-as-a- programming-language/answer/Justin-Moore Nørmark, K. (2013, July 2). Aalborg University. Retrieved January 29, 2016, from Overview of the four main programming paradigms: http://people.cs.aau.dk/~normark/prog3- 03/html/notes/paradigms_themes-paradigm-overview-section.html Odersky, M. (n.d.). What is Scala. Retrieved January 29, 2016, from Scala: http://www.scala- lang.org/what-is-scala.html Odersky, M., Altherr, P., Cremet, V., Dragos, I., Dubochet, G., Emir, B., et al. (2006). An Overview of the Scala Programming Language. Lausanne, Switzerland: Ecole Polytechnique Federale de Lausanne. Odersky, M., Spoon, L., & Veners, B. (2008, May 6). Scala:A Scalable Language. Retrieved January 27, 2016, from Artima Developer: http://www.artima.com/scalazine/articles/scalable-language.html Ulrich, H. (2012, October 23). Pros & Cons of Scala Programming for Agile Software Development. Retrieved January 29, 2016, from Celerity: http://blog.celerity.com/pros-cons-scala Van Roy, P. (n.d.). Programming Paradigms for Dummies: What Every Programmer Should Know. Retrieved January 29, 2016, from Institute of Information and Communications and Communication Technologies, Electronics and Applied Mathematics: https://www.info.ucl.ac.be/~pvr/VanRoyChapter.pdf