Scala 3.0

Do you know about Union Types in Scala 3.0?

Reading Time: 2 minutes You might have learnt union of subsets in mathematics, similarly, we have union types in Scala 3.0 as well. Let’s see, how can we use union types while programming in scala: What is Union? Union of two things under consideration, is the collection of elements which can belong to either of them or both of them . Let’s understand with respect to set theory:Set s1 Continue Reading

Do you know about Intersection Types in Scala 3.0, Dotty?

Reading Time: 2 minutes You might have learnt intersection of subsets in mathematics, similarly, we have intersection types in Scala 3.0 as well. Let’s see, how can we use intersection types while programming in scala: What is Intersection or Conjunction? Intersection of two or more things under consideration, is the collection of common things among them. Let’s understand with respect to set theory:Set s1 = {2, 3, 5}, set Continue Reading