This is an old revision of the document!
Scala setup
Installation
Scala can be downloaded and installed on either a Windows or NIX platform (e.g. Linux, OS-X) here. For this lecture you must install Scala 3, and we recommend installing it using Coursier (see the previous link)
IDE
One of the most widely used IDE (Integrated Development Environment) for Scala is:
- Visual Studio Code with Scala (Metals) extension
- alternatively, you can use Sublime, which is a simpler (faster) editor. You can add syntax highlighting plugins for Scala (see: scalameta ), as well as worksheet/REPL support (see: SublimeREPL).
Configurare IDE pentru primul laborator - 2026
- Deschideti Visual Studio Code din directorul unde vreti sa salvati noul proiect cu laboratoarele.
- Instalati extensia Metals in Visual Studio Code. Pe bara din stanga va aparea un simbol cu forma M.
- Apasati pe simbolul M al extensiei Metals.
- Apasati pe New Scala Project pentru a crea un proiect nou pentru laboratoare.
- Alegeti un template de baza (de exemplu scala/hello-world.g8). Nu e relevant pe care il alegeti.
- Salvati proiectul.
- Intrati in tabul Explorer de la Visual Studio Code (prima iconita cu file de pe bara din stanga ecranului).
- Dati click dreapta pe directorul src/main/scala si apasati New Scala File.., apoi alegeti Worksheet si puneti-i un nume (ex: laborator1)
- Scrieti o functie din laborator si apelati-o. Apasati CTRL+S pentru a fi generat output-ul.