Home » JVM Languages » Scala (page 29)

Scala

Scala Tutorial – Tuples, Lists, methods on Lists and Strings

Preface This is the second in a planned series of tutorials on programming in Scala for first-time programmers, with specific reference to my Fall 2011 course Introduction to Computational Linguistics. You can see the other tutorials here on this blog; they are also listed on the course’s links page. This tutorial focuses on Tuples and Lists, which are two constructs ...

Read More »

Scala Tutorial – Scala REPL, expressions, variables, basic types, simple functions, saving and running programs, comments

Preface The is the first of several Scala tutorials I’m creating for my Fall 2011 graduate Introduction to Computational Linguistics course at UT Austin, loosely based on similar tutorials that Katrin Erk created for teaching Python in a similar course. These tutorials assume no previous programming background, an assumption which is unfortunately still quite rare in the help-folks-learn-Scala universe, and ...

Read More »

Fun with function composition in Scala

The goal of this post is to show how a list of functions can be composed to create a single function, in the context of mapping a set of values using those functions. It’s a cute example that shows off some of the goodness that comes with functional programming in Scala. And, while this isn’t a tutorial, it might still ...

Read More »

Yes, Virginia, Scala is hard

Let me first say that I am a Scala lover and have been a Scala champion for almost 5 years. I’ve written books and articles on Scala. I’ve worked with dozens of companies that have launched Scala and Lift projects. I’ve code reviewed many dozens of Scala projects. I used to think that Scala was easy. It was, and continues ...

Read More »

Testing with Scala

When learning a new language or framework one of my early questions is nowadays: What about testing? Obviously I asked that for Scala as well. If there is anything to complain about I guess it is once more the large number of options one has. JUnit Scala is highly compatible with Java and this includes the popular testing framework Junit. ...

Read More »

How Scala changed the way I think about my Java Code

Some people advocate their preferred language as the only way to enlightenment and productivity boosts way in the two digit percentage range compared to another language in the same category. I don’t believe it. (It’s probably true when you compare things like Java and Assembler, but few do that). There are others that tell you the language doesn’t matter at ...

Read More »

What features of Java have been dropped in Scala?

Despite more complex and less intuitive syntax compared to Java, Scala actually drops several features of Java, sometimes for good, other times providing replacements on the standard library level. As you will see soon, Scala isn’t a superset of Java (like Groovy) and actually removes a lot of noise. Below is a catalogue of the missing features.       ...

Read More »