Scala Type System
Scala Type System is quite rich (that also means it is a huge) and offers lots of options. Unfortunately, this also means that we cannot cover the type system in one blog entry. Before we dive into the depths of Scala type system let’s just understand the various components it is made up of so that we can appreciate how rich it is. Scala type system can be divided into the following. Scala Predefined Types Parameterised Types Custom types Abstract Types Bounds Variances Type classes Scala PreDefined Types So, as you can see this is a really wide area. Let’s start with the simplest of them all the predefined types. Pre-defined types in Scala are the primitive types like int, string etc. To understand it simply let’s see the most used Scala type hierarchy diagram. See Below Let’s try and understand this Scala type hierarchy as a first step. Any … Read more