constructors

Scala Constructor Arguments and what difference does it make

Reading Time: 3 minutes Introduction to Scala constructors Scala constructors might feel a little unusual especially if we come from a more verbose language. Constructors in Scala are of 2 types: Primary Constructor Auxiliary Constructor This is how we declare a primary constructor in Scala: In this blog, we will see different ways to pass arguments in the primary constructor and how it affects their visibility. Passing arguments in Continue Reading

Combating Fallacy in Scala

Combating Fallacy in Scala: Part 3

Reading Time: 3 minutes Hey everyone, I’m back with another blog, “Combating Fallacy in Scala: Part 3“. So, in this blog, we will have a look into Classes in Scala and the Constructor Parameters. Class and Constructor Parameters Before moving to the problem in this blog, let’s have a look at classes in Scala. According to the Scala Docs “Classes in Scala are blueprints for creating objects. They can Continue Reading

Scala Beginner Series (2) : Object Oriented Scala

Reading Time: 7 minutes This series is all about the taste of Scala.It is best suitable for all the newbies in Scala. You may also like: Scala Beginner Series (1) : Basics In the previous part, we covered: Values, variables, expressions and types Functions and recursion The Unit type This article will cover the object oriented nature of Scala language. Classes Scala has the same concept of a class as we Continue Reading