Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly is Dotty?

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.

like image 498
nomadSK25 Avatar asked Jul 26 '18 04:07

nomadSK25


People also ask

What is a dotty girl?

/ˈdɒt.i/ UK informal. slightly strange or mentally ill: a dotty old woman.

What's a dotty UK slang?

dotty. / (ˈdɒtɪ) / adjective -tier or -tiest. slang, mainly British feeble-minded; slightly crazy.

What is dirty slang for?

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.

What is a synonym for Dotty?

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.


1 Answers

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.

like image 199
Ra Ka Avatar answered Sep 24 '22 20:09

Ra Ka