Type Bounds

scala futures

Basic of Generics and Type Bounds in Scala

Reading Time: 3 minutes Introduction to Scala Generics Scala Generics are kind of like functions for variable types. With the usage of Scala Generics you should reuse our code. Normally, make a function for a task that we do a lot of, so instead of having to repeat the same code over and over again, we let the compiler and computer do that behind the scenes for us. Scala Continue Reading

Type Parameterization

Reading Time: 4 minutes Introduction Hello everyone, in this blog we discussed Type Parameterization in Scala. It generally covers generic, types bounds and variance in Scala. What is type Any class, trait or object is a type Anything defined by type keyword is a type. For example, type A = String Why we use type parameterization? Type parameterization allows you to write generic classes and traits. For example, sets Continue Reading

Scala: Type Bounds

Reading Time: 3 minutes As we have already discussed in my last blog about the Type Parameterization concepts like Generics, Generic classes, and Variance. So to follow up, in this blog we’ll be discussing type bounds. Type Bounds: How can we create type parameter restrictions? To create them we make use of Scala type bounds. In Scala, Type Bounds are restrictions on Type Parameters or Type Variable. By using Type Continue Reading