Interesting fact about Scala Last Updated : 26 Feb, 2019 Comments Improve Suggest changes Like Article Like Report Scala(pronounced as "skah-lah") is general-purpose programming language designed by Martin Odersky. The design of Scala started in 2001 at EPFL, Lausanne, Switzerland. Scala was released publicly in 2004 on Java platform. Scala is designed to be concise and addresses criticisms of Java. Scala source code is compiled to Java byte code and the resulting executable code runs on a Java Virtual Machine. The latest release of Scala is 2.12.8. Some Interesting Facts About Scala Name: Scala is short for Scalable Language. A Hybrid Language: Scala is a fusion of Object Oriented Programming(OOP) and Functional Programming. OOP is a programming paradigm based on the concept of "objects", which are data structures that contain data in the form of fields and code in the form of procedures or methods. On the other hand, Functional programming is a programming paradigm, computer programs, are building by a structure and elements. that the evaluation of mathematical functions are treated as computation and avoids mutable data and also avoids changing-state . These two paradigms differentiate Scala from other programming languages. Auto-Inference: Scala automatically infers type information. Type information is supplied by the user only if it is necessary. Mutable and Immutable Variables: Scala allows us to make any variable mutable or immutable at the time of declaration. Keyword var defines any variable as mutable while keyword val defines a variable as immutable. No Semicolon: Semicolon acts as a separator in most of the modern programming languages(C, C++, Java, etc) and is a mandatory character to be written after every statement. However, Scala does not need a semicolon after every statement. Scala statements can be separated by newline character. Import statements: It is not necessary to write all import statements in the beginning of the program. Importing classes in Scala can be done at any point. Features of Scala: Apart from all OOP features of Java, Scala has features of functional programming languages like Scheme, Standard ML and Haskell, including currying, type inference, immutability, lazy evaluation, and pattern matching. Functions and Procedures: In Scala, functions and procedures are two different entities and are not used interchangeably. Function can return any type and contains = sign in its prototype. Procedure, on the other hand, does not have = sign and has Unit() return type in all cases. Print statements are generally not encouraged in function definition. Example: def func1():Int = { //this is a function //returns Int } def proc1() { //this is a procedure //returns void(Unit()) } Higher-Order Functions: In Scala, we can pass a function as an argument to another function. Such functions are called higher-order functions. Example: val l = List(1, 2, 3) l.foreach(println) // println passed as an argument to foreach function Also, a function's return value can be another function. Example: def square(x:Float) = { pow(x, 2) } Supports Nested Functions: We can define a function within another function and make use of it as per the requirement. Nested function can be called from any point within the scope of outer function. Big Data Industry: Apache Spark is an open-source cluster-computing framework and is a widely used technology for big data processing. Spark programs are written in Scala because of its scalability on JVM . Scala is most prominently used language by big data developers for working on Spark projects. Use cases of Spark with Scala- Alibaba, Netflix, Pinterest, etc. Comment More infoAdvertise with us Next Article Interesting fact about Scala M MohammadKhalid Follow Improve Article Tags : Scala Similar Reads Abstract Classes in Scala Abstraction is the process to hide the internal details and showing only the functionality. In Scala, abstraction is achieved by using an abstract class. The working of the Scala abstract class is similar to Java abstract class. In Scala, an abstract class is constructed using the abstract keyword. 5 min read Pure Function In Scala In any programming language, there are two types of functions: 1. PURE FUNCTIONS 2. IMPURE FUNCTIONSThere is a basic difference between the two, that is pure function doesnât change the variable itâs passed and an impure function does. For example, there exists a function which increases the input b 3 min read Difference between Kotlin and Scala Scala may be a exceptionally multi-paradigm language that can run anyplace from being distant better than improved Java to a more regrettable Haskell. This implies that Scala libraries and codebases regularly utilize a assortment of distinctive coding styles, and learning to work with them all can t 3 min read Introduction to Scala Scala is a general-purpose, high-level, multi-paradigm programming language. It is a pure object-oriented programming language which also provides the support to the functional programming approach. There is no concept of primitive data as everything is an object in Scala. It is designed to express 7 min read How to Install Scala in Linux? Prerequisite: Introduction to Scala Before, we start with the process of Installing Scala on our System. We must have first-hand knowledge of What the Scala Language is and what it actually does? Scala is a general-purpose, high-level, multi-paradigm programming language. It is a pure object-oriente 3 min read Like