20

What language is Scala written in?

Where does one get the source code of Scala? i'm looking for the Scala source itself, not a project written in Scala.

Note: I've seen https://stackoverflow.com/questions/2135966/where-do-i-find-an-open-source-project-written-in-scala among some other discussions here.

Community
  • 1
  • 1
Roam
  • 4,831
  • 9
  • 43
  • 72
  • https://github.com/scala/scala is the source code – Jesse Webb Aug 24 '15 at 21:15
  • "We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations." This simply does not hold in this case.... – Mehdi LAMRANI Jul 30 '20 at 18:44

2 Answers2

24

Scala is [now] written in Scala. This process (of creating a language/compiler that can be used to build itself) is known as "bootstrapping".

The scalac source code can be found on GitHub scala/scala:

[GitHub scala] is the repository for the Scala Programming Language.

For the "compiler guts", start looking in nsc - New Scala Compiler.

Also see the Scala Developer Documentation "portal" which briefly hints how newer Scala/scalac versions are layered on top of previous builds.

Community
  • 1
  • 1
user2864740
  • 60,010
  • 15
  • 145
  • 220
5

Scala is written in Scala itself, and I think user2864740 has already explained a little bit about 'bootstrap'.

For the source code exploring, Github is definitely a good place, but I happened to know a good place Codatlas to view Scala Source Code, which provides some very essential IDE features, like jump to definition and cross reference. To me it has better code browsing experience than GitHub on the web.

For example, Array class is a good place to start.

I used it a lot recently to view Scala source code. Hope this helps.

hexabunny
  • 1,405
  • 1
  • 11
  • 12
BigGameHunter
  • 93
  • 1
  • 4