Report from Scala Days 2012

On April 17-18 the three of us attended the Scala Days 2012 conference in London. Many of the most known and active contributors to the Scala community were there – either as attendee or speaker. The conference was fully booked with 400 participants and so many on waiting list. We would like to give a [...]

Tags: , , ,

Getting Started with Spring Data – MongoDB in Scala

I used MongoDB for a project in 2010 and I had great experience with it. Unfortunately I didn’t get the chance to work with this agile and scalable document-oriented database again until now. But my current assignment has brought the opportunity to use it in production In this post I want to show you a [...]

Tags: , , ,

Experimenting with Scala Parallel Collections (contd.)

In the previous post we went through Scala parallel collections and you saw how you can convert a sequential collection into a parallel one by using method par on that collection. In this post I want to show you how you can write your own parallel collection in Scala. The example I use for this [...]

Tags: , ,

Injectors and Extractors in Scala

If you have used case classes in Scala, you can not neglect the power they bring to your applications. They provide a recursive decomposition mechanism via pattern matching. In this post I go through injectors and mostly extractors. You will see that how extractors can be employed for pattern matching. Consider that we need to [...]

Tags: , , ,

Scala Type Variances – Part three

So far we have seen how to define covariant and contravariant subtypes in Scala. In this post we will study lower bounds and upper bounds and see how they can be of great help when designing your application. Lower bounds Consider the class I defined in the first post: Company is covariant in type T [...]

Tags: , , , , ,

Scala Type Variances – Part two

In the previous post, I went through what covariant subtyping is. In this post we will study contravariant subtyping with a small example. Contravariant Subtyping Do you remember the definition of covariant? Contravariant is the other way around. I will clarify this by the following example (example is adopted from [1]). Consider we have a [...]

Tags: , , , ,

Scala Type Variances – Part one

I remember when I started to learn Scala, I usually come up with brackets in the Scala API doc that have plus and minus characters inside. Honestly that scared me a little bit! But after I learned a bit about Scala type system, I know the purpose of theses type declarations and I appreciate their [...]

Tags: , , , ,

Experimenting with Scala Parallel Collections

In this short post, I want to show you how you can avail from Scala parallel collections in your application and under which conditions it makes sense to use it. Parallel Collections were introduced in Scala 2.9 release which are built on the same abstractions and provide the same interfaces as existing collection implementation. It [...]

Tags: , ,