There was a lot to learn at the Java sessions of the GIDS 2012 with topics covering Java 7, Java 8, Concurrency in Java using STM model, Java EE 7 and its various JSRs, Scala, JavaScript among other topics. And… Read More ›
scala
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 Function value- When this function literal is assigned to a reference they become… Read More ›
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 different constructors. Summarizing about the introduction in the… Read More ›
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 related to OOP in Scala (may be a… Read More ›
BOJUG Meet- 20th March 2010
BOJUG met for the month on March at Misys Software Solutions (India) Private Limited. The meet was completely focused on Android and learning Android framework is on the top of my wish list- So a perfect match it was :)…. Read More ›
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 it refers to List which has no contents…. Read More ›
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 they can have method and field definitions. More… Read More ›
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 not required to use semicolons to terminate a… Read More ›
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 in the If-Statement. In Scala If-Statements are expressions,… Read More ›
Tuples- Returning multiple values in Scala
When I was coding in Java I used to build Classes just to return multpile values and also sometimes used pass by reference (by means of using Objects). I really missed a permanent solution 🙁 Scala has a solution for this- It supports something called “Tuples” which is created with the literal syntax of a comma-separated list of the items inside parentheses like (x1,x2,x3 …). The items in the parantheses may not be related to each other in terms of the type, which means that we can have String’s, Int’s and so on. These literal “groupings” are instantiated as scala.TupleN instances, where the N is the number of items in the tuple. The Scala API defines separate TupleN classes for N between 1 and 22, inclusive. Tuples can be assigned to variables, passed as values or return them from the methods.