Scala Generics

Scala Generics

Scala Generics III: Generalized type constraints

This is the third article in our series of Scala Generics ( we have already looked at upper and lower Scala Type bounds, Covariance and Contravariance) and today we are going to talk about constraints, to be more specific about generalized … Read More

Scala Generics

Scala Generics II: Covariance and Contravariance

In the previous article we looked at Scala Type bounds, today we will continue with Scala generics and talk about Covariance and Contravariance in generics. Liskov substitution principle (the L. of S.O.L.I.D.) specifies that, in a relation of inheritance, a type … Read More

Scala Type Bounds

Scala Generics I: Scala type bounds

Generic types in Scala Generic types, abstract types, scala type bounds, all these concepts are unusual for software developers who are coming from languages in which the generics are not (or barely) used, so in this first article, we will … Read More