DZone Scala Refcard
The website DZone has a collection of RefCardz, cheat sheets for developers about many different subjects. Earlier this year, DZone asked me to write a RefCard about Scala. It has now been published! It’s RefCard number 164.
The website DZone has a collection of RefCardz, cheat sheets for developers about many different subjects. Earlier this year, DZone asked me to write a RefCard about Scala. It has now been published! It’s RefCard number 164.
Scala 2.9 is out, and one of the new features in this release are parallel collections. These make it almost trivial to do for example a foreach over a collection in parallel. I added a ParallelCollectionsRenderer to MandelActors which looks very simple: object ParallelCollectionsRenderer extends Renderer { override def render(sampler: Sampler, compute: Sample => Color, …
Continue reading ‘Scala 2.9 parallel collections for MandelActors’ »
One interesting feature that was added to Scala in version 2.8 is specialization, using the @specialized annotation. First, a little background information. Generics in Java and the JVM, and consequently also in Scala, are implemented by using type erasure. That means that if you have an instance of a generic class, for example List[String], then …
I recently bought the pre-print edition of the book Actors in Scala. At the moment the books is not yet complete; the last three chapters are missing and I found a number of minor mistakes, but it looks like this is going to be a useful book on actors. To experiment with actors, I created …
Writing a generic interpolate method; it doesn’t work with structural types, but it does with type classes.
Scala has a strange limitation when importing methods with the same name from different scopes – a bug in the compiler that won’t be fixed soon.
Methods in structural types are called via reflection, which is a lot slower than normal method calls. This can make “Pimp My Library” functions slow.
Installing the Scala plugin on NetBeans 6.9.
How to convert an Option holding one type to an Option holding another type by using the collect method.