What is Scala?

What is 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 the general programming patterns in a refined, succinct, and type-safe way. Scala programs can convert to bytecodes and can run on the JVM(Java Virtual Machine). Scala stands for Scalable language. It also provides the Javascript runtimes. Scala is highly influenced by Java and some other programming languages like Lisp, Haskell, Pizza, etc.

Evolution of Scala: Scala was designed by the Martin Odersky, professor of programming methods at École Polytechnique Fédérale de Lausanne (EPFL) in Switzerland and a German computer scientist. Martin Odersky is also the co-creator of javac (Java Compiler), Generic Java, and EPFL’s Funnel programming language. He started to design the Scala in 2001. Scala was first released publicly in 2004 on the Java platform as its first version. In June 2004, Scala was modified for the .Net Framework. Soon it was followed by second version i.e. (v2.0) in 2006. At JavaOne conference in 2012, Scala was awarded as the winner of the ScriptBowl contest. From June 2012, Scala doesn’t provide any support for .Net Framework. The latest version of scala is 2.12.6 which released on 27-Apr-2018.

Why Scala?

Scala has many reasons for being popular among programmers. Few of the reasons are :  

  • Easy to Start: Scala is a high level language so it is closer to other popular programming languages like Java, C, C++. Thus it becomes very easy to learn Scala for anyone. For Java programmers, Scala is more easy to learn.
  • Contains best Features: Scala contains the features of different languages like C, C++, Java, etc. which makes the it more useful, scalable and productive.
  • Close integration with Java: The source code of the Scala is designed in such a way that its compiler can interpret the Java classes. Also, Its compiler can utilize the frameworks, Java Libraries, and tools etc. After compilation, Scala programs can run on JVM.
  • Web – Based & Desktop Application Development: For the web applications it provides the support by compiling to JavaScript. Similarly for desktop applications, it can be compiled to JVM bytecode.
  • Used by Big Companies: Most of the popular companies like Apple, Twitter, Walmart, Google etc. move their most of codes to Scala from some other languages. reason being it is highly scalable and can be used in backend operations.

Note: People always thinks that Scala is a extension of Java. But it is not true. It is just completely interoperable with Java. Scala programs get converted into .class file which contains Java Byte Code after the successful compilation and then can run on JVM(Java Virtual Machine). 

Beginning with Scala Programming

Finding a Compiler: There are various online IDEs such as GeeksforGeeks IDE, Scala Fiddle IDE, etc. which can be used to run Scala programs without installing.

Programming in Scala: Since the Scala is a lot similar to other widely used languages syntactically, it is easier to code and learn in Scala. Programs can be written in Scala in any of the widely used text editors like Notepad++, gedit, etc. or on any of the text-editors. After writing the program, save the file with the extension .sc or .scala

For Windows & Linux: Before installing the Scala on Windows or Linux, you must have Java Development Kit(JDK) 1.8 or greater installed on your system. Because Scala always runs on Java 1.8 or above.  In this article, we will discuss how to run the Scala programs on online IDE’s. 

Example : A simple program to print Hello Geeks! using object-oriented approach.

To view or add a comment, sign in

More articles by Shruti Anand

  • Google Cloud Platform

    Google Cloud Platform (GCP) is a cloud computing service by Google that helps businesses, developers, and enterprises…

  • SQL

    SQL stands for Structured Query Language. It is a standardized programming language used to manage and manipulate…

  • What is Microsoft Power Automate?

    Microsoft Power Automate, formerly called Microsoft Flow, is cloud-based software that allows employees to create and…

  • ETL

    The ETL (Extract, Transform, Load) process plays an important role in data warehousing by ensuring seamless integration…

  • What is UiPath Used For?

    UiPath is used to streamline business processes that are time-consuming, manual, error-prone, repetitive, and mundane…

  • Data Bricks

    Databricks is a unified, open analytics platform for building, deploying, sharing, and maintaining enterprise-grade…

  • SSIS

    SSIS Definition SQL Server Integration Services (SSIS) is a Microsoft SQL Server database built to be a fast and…

  • What is Tableau?

    Tableau is a visual analytics platform that is revolutionizing the way we use data to solve problems by enabling…

  • What is back-end development?

    Back-end development means working on server-side software, which focuses on everything you can’t see on a website…

  • Front-end Development

    Front-end Development is the development or creation of a user interface using some markup languages and other tools…

Insights from the community

Others also viewed

Explore topics