scala

Scala Nuggets: Avoiding the Billion Dollar Mistake of Null

Reading Time: 2 minutes Historically, the use of null has often been referred to as the billion dollar mistake. It has led to more problems than solutions Tony Hoare introduced Null references in ALGOL W back in 1965 “simply because it was so easy to implement”, says Mr. Hoare. He talks about that decision considering it “my billion-dollar mistake”. Let us look at the following code in Java which Continue Reading

Scala Nuggets: The Tasty Tuples

Reading Time: 2 minutes One of the interesting things that Scala has to offer is a concept called Tuples. It is a literal syntax of comma-separated list of items inside parenthesis. Something like (a1, a2, a3). These “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. (I Continue Reading