I am reading about Scala 3 and discovered dotty. I am trying to understand what it is. Somewhere I read "It is new compiler", somewhere I read "It is part of Scala 3", and somewhere I read "Dotty is new Scala 3".
Can somebody please explain to me what exactly dotty is? In layman's and technical terms?
PS: I have already read the tag info of dotty on StackOverflow but didn't really understand it.
/ˈdɒt.i/ UK informal. slightly strange or mentally ill: a dotty old woman.
dotty. / (ˈdɒtɪ) / adjective -tier or -tiest. slang, mainly British feeble-minded; slightly crazy.
obscene; pornographic; indecent: a dirty joke. undesirable or unpleasant; thankless: He left the dirty work for me. very unfortunate or regrettable: That's a dirty shame! not fair or sportsmanlike; unscrupulous: a dirty fighter. hostile, insulting, contemptuous, or resentful: She gave me a dirty look.
In this page you can discover 66 synonyms, antonyms, idiomatic expressions, and related words for dotty, like: crazy, nutty-as-a-fruitcake, insane, eccentric, unbalanced, wacky, gaga, batty, bonkers, buggy and cracked.
Let me explain with foundation of Scala 3:
The Dependent Object Types (DOT) is a new foundation for Scala which is to be Scala 3. DOT is a core calculus for path-dependent types which enhance Scala language and its type systems to next level.
According to this blog by Martin Odersky:
"What do you get if you boil Scala on a slow flame and wait until all incidental features evaporate and only the most concentrated essence remains? After doing this for 8 years we believe we have the answer: it’s DOT, the calculus of dependent object types, that underlies Scala."
Therefore, In Scala 3, DOT - Dependent Object Type, has been implemented as foundation of Scala and DOTTY is a project for the development of Scala 3 with DOT. In addition, Scala 3 works on new compiler which is also called Dotty that support DOT and which is more powerful that current version of Scala compiler. Technically, For Scala 2 and below, scalac
is compiler, but for Scala 3, dotc
is a compiler.
So, the language specification are the same in Scala 2(below) and Scala 3, but the compiler is new which desugar to DOT. Also, with DOT as foundation, there are additional new features in Scala 3 e.g. union types, intersection-type etc.
Is DOTTY is new programming language?
No. Dotty is the project name for a language and compiler that is slated to become Scala 3.0, That means, DOTTY is next version of Scala programming language, with a new compiler (also called Dotty).
I hope this will give you beginner insight to dotty.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With