Trivial pursuit

How well do you know your Scala trivia?

Lightbend Engineering
© Shutterstock / Frazao

We’re back with another pub quiz on the history of another favorite programming language. This time, we’re testing your knowledge about the life and times of Scala. Do you know everything there is to know about this functional language?

We love our Scala and it’s no surprise why. Initially designed to address many of the common criticisms of Java, Scala is a functional and concise programming language.  Today, we’re testing your Scala trivia to see how well you know your history.

Let’s get down to the questions!

1. When was Scala created?
a) 1997
b) 2004
c) 2005
d) 2010

Answer: b) 2004! Martin Odersky, a German computer scientist, created Scala in 2004.


2. Scala is governed by the EPFL. What does EPFL stand for?
a)  Eclipse Process Flow Language
b)  rEal Programming For Luminaries
c)  École Polytechnique Fédérale de Lausanne
d)  Enterprise Functional Programming Language (the error in order was unintentional but it stuck)

Answer: c) École Polytechnique Fédérale de Lausanne! The EPFL, or Swiss Federal Institute of Technology in Lausanne, is a research institute/university in Switzerland that specializes in physical sciences and engineering. Martin Odersky is a professor there.


3. Martin Odersky’s previous programming language, co-designed with Philip Wadler, was called:
a)  Pizza
b)  Chai
c)  Repast
d)  Chocolate

Answer: a) Pizza! Pizza was designed in 1996. It was a superset of Java. Some of Scala’s features were already present, such as pattern matching.

SEE MORE: 5 reasons why Scala is better than Java

4. A collection of type scala.Seq is immutable.

a)  True
b)  False

Answer: b) False. It might be mutable or immutable. scala.Seq doesn’t provide any mutating methods, so a method that receives a Seq can’t mutate it; but other code might be able to.

5. How many lines of code does the Scala compiler have? Specifically, how many lines of code are in version 2.12.2 (including the sources of the Scala reflection module “scala-reflect”) on which the compiler is built)?

a) 525,600 lines total, 495,071 lines of code
b) 24,601 lines total, 22,742 lines of code
c) 136,008 lines total, 84,913 lines of code
d) 190,637 lines total, 107, 253 lines of code.

Answer: c) 136,008 lines total, 84,913 lines of code! That’s a lot of code. 525,600 is of course the number of minutes in a year and 24601 is Javert’s prison number. And for those eagle-eyed Ravenclaws, d) refers to the wordcounts of Harry Potter and the Goblet of Fire and Prisoner of Azkaban, respectively.


6. How many individuals have contributed to the scala/scala repository in the last year?

a) 42
b) 78
c) 87
d) 89

Answer: b) 78!  You can check out yourself and see all the people who have worked on Scala as contributers. git shortlog -sn --since="23 May 2016" | wc -l

7. Order the following language features from oldest to newest:

a) Procedure syntax: `def f() { …}` is equivalent to `def f(): Unit = { … }`
b) Optional semicolons
c) Lazy Values
d) Tuple Syntax, initially with curly braces: {1, 2} is equivalent to Tuple2(1, 2)=

Answer: b, a, d, c! Optional semicolons were a part of 2.0, Procedure syntax showed up in 2.30, Tuple Syntax followed right after in 2.3.2, and Lazy values were a part of 2.6.0.

SEE MORE: Interview with Scala creator Martin Odersky — The current state of Scala

8. Which feature was never worked on?

a) Virtual Classes
b) Indentation-based syntax without curly braces 
c) Translation to German, including all keywords 
d) Making types optional, dynamic typing

Answer: d) Making types optional. As far as we know, anyways! Virtual classes, indentation-based syntax without curly braces, and a translation to German are all available online.


9. Which of the following runtime platforms is it not currently possible to compile Scala to:

a) JVM
b) Android
c) .NET
d) JavaScript

Asnwer: c) .NET. Support for compiling to .NET was abandoned in 2012.

So, how well did you do in our Scala trivia test? See where you stack up:

0 – 3 correct: You’re just a Scala beginner. Time to hit the books and do a bit more studying.

4 – 5 correct: You’re pretty solid in your Scala history, but you should pay closer attention to some things!

6 – 8 correct: Nice! You really know your stuff!

9 correct: You are a Scala master.


Previously in our trivia series, we tested our Java knowledge.



Lightbend Engineering

  • Markus Eisele is a Developer Advocate at Lightbend.
  • James Roper is a Tech Lead at Lightbend.
  • Seth Tisue is a Software Engineer at Lightbend.
  • Lukas Rytz is a Software Engineer at Lightbend.
  • Ignasi Marimon-Clos i Sunyol is a Software Engineer at Lightbend.

Leave a Reply

Be the First to Comment!

Notify of