Previously I had written about Companion classes in Scala and there in I had mentioned one of its uses i.e defining the apply method to support object literals. In this post I […]
Brief overview of An “object” in Scala
In Java world we are all familiar with the term object and interchangeably use it with the term instance. Both these terms represent initialization of a class with the required parameters. But […]
Book Review: Scala for the Impatient
The book covers almost all of the concepts in Scala in a very concise format. More emphasis on learning by doing. Lot of exercise problems at the end of each chapter. It […]
Partially applied functions in Scala
Before going into Partially applied Functions, let me introduces 2 terms- Function Literal- This exists in the source code- Something similar to Class definition. So we have [scala gutter=”false”] (x:Int,y:Int) => x+y […]
Brief insight into Constructors in Scala
In the previous post here, I had introduced few concepts related to constructors in Scala. In this post I would go a bit deeper into the constructors and how we can provide […]
Object Oriented Programming in Scala- 1
Scala uses both Object oriented and functional programming concepts. For folks coming from the Java, we would always explore how to do OOP in Scala. Here I thought of writing few posts […]
Null, null, Nil, Nothing, None, and Unit in Scala
Null– Its a Trait. null– Its an instance of Null- Similar to Java null. Nil– Represents an emptry List of anything of zero length. Its not that it refers to nothing but […]
Traits in Scala- Deep Dive
Traits are units of code reuse in Scala. Traits encapsulates methods and field definitions. Their role is similar to that of interfaces in Java- A workaround for Multiple Inheritance. But unlike Interfaces […]
How’s Scala different from Java?
Scala is statically type like Java but with Type Inferencing support. Which means that the scala compiler analyzes the code deeply to determine what type a particular value is. In Scala its […]
Control Structures in Scala- A brief overview
If Statements: Lets consider a first entry example of If statments, without using much of Scala’s features. This is a pretty simple and straight forward examples. Now lets add some Scala flavor […]