background preloader

Scala

Facebook Twitter

Introduction. Scala is a modern multi-paradigm programming language designed to express common programming patterns in a concise, elegant, and type-safe way.

Introduction

It smoothly integrates features of object-oriented and functional languages. Scala is object-oriented Scala is a pure object-oriented language in the sense that every value is an object. Types and behavior of objects are described by classes and traits. Classes are extended by subclassing and a flexible mixin-based composition mechanism as a clean replacement for multiple inheritance. Scala is functional Scala is also a functional language in the sense that every function is a value.

Furthermore, Scala’s notion of pattern matching naturally extends to the processing of XML data with the help of right-ignoring sequence patterns. Scala is statically typed Scala is equipped with an expressive type system that enforces statically that abstractions are used in a safe and coherent manner. Scala is extensible Scala interoperates with Java and .NET. Betting Exchange Research Blog: Moving from Java to Scala - One year later...

Reading this Scala evaluation please put a bit of attention to what is it about and what it is not.

Betting Exchange Research Blog: Moving from Java to Scala - One year later...

For sure, I'm not trying to examine Scala just by looking only at its design, syntax and other language capabilities. Instead of that, I'm aiming to answer the questions raised in the introduction above. Was it a good decision or I made a mistake adopting Scala? Is Scala ready for Enterprise project or not yet? To answer those questions, in addition to evaluating Scala itself, a few other factors have to be considered: To evaluate Scala programming language in a context of all categories and business domain mentioned above, I will examine all of them one by one applying the following point system: Evaluation Over last year, developing trading simulator I was taking some notes on many aspects of adopting Scala programming language in a light of all evaluation categories presented above.

Programming language There is one more important aspect of Scala that I'd like to mention to you. Testing. 10 Scala Programming Pitfalls. We Recommend These Resources Scala is great for highly scalable, component-based applications that support concurrency and distribution.

10 Scala Programming Pitfalls

It leverages aspects of object-oriented and functional programming. This JVM-based language gained most of its clout when it was announced that Twitter was using it. If used correctly, Scala can greatly reduce the code needed for applications. For the Scala programmmer, DZone has gathered these common code-writing pitfalls. 1. Thinking of "yield" as something like "return". For(i <- 0 to 10) { if (i % 2 == 0) yield i else yield -i} Where the correct expression is: for(i <- 0 to 10) yield { if (i % 2 == 0) i else -i} 2. Using scala.xml.XML.loadXXX for everything. Also, forgetting spaces around the equal sign when handling XML. Val xml=<root/> really means: val xml. So, the way to write that assignment is: val xml = <root/>

Scala. Main Page - Another tour of Scala. This is my own “re-telling” of the tour of Scala from the official Scala website.

Main Page - Another tour of Scala

If you are wondering why another tour, it’s mostly because it was fun and informative. I hope you feel the same way. You should be able to go through these in the order listed, with each building on previous topics. I’ve also linked to the original tour topics as well as added my own where I thought it might help. Basics ScalaBasics – Scala has some surprising syntax for both Javaists and Rubyists.

Intermediate ScalaFunctions – Scala has strong support for functional programming. Advanced ImplicitParameters – Scala can automatically pass parameters to methods that need them! Scala 2.