The document discusses union types and literal singleton types in Scala and Dotty. It begins by explaining what union and intersection types are, and how they can be modeled in Scala using implicit evidence. It then shows how to define union types in 3 lines of code in Scala. The document also discusses how union types are currently implemented in Dotty, including some bugs when combining union types with literal singleton types. It concludes by noting that Dotty is still pre-beta.
17. PROGRAMMING IS LIKE LOGIC
if it is thursday there's a scala meeting
if there's a scala meeting the term 'monad' will come up
it is thursday
-------------------------------------------------------
the term 'monad' will come up
18. PROGRAMMING IS LIKE LOGIC
it is thursday → there's a scala meeting
there's a scala meeting → the term 'monad' will come up
it is thursday
-------------------------------------------------------
the term 'monad' will come up