Scala is a general purpose programming language principally targeting the Java Virtual Machine. Designed to express common programming patterns in a concise, elegant, and type-safe way, it fuses both imperative and functional programming styles.

learn more… | top users | synonyms

67
votes
1answer
8k views

What's the difference between Scala and Red Hat's Ceylon language? [closed]

Red Hat's Ceylon language has some interesting improvements over Java: The overall vision: learn from Java's mistakes, keep the good, ditch the bad The focus on readability and ease of learning/use ...
43
votes
3answers
4k views

What are the biggest differences between F# and Scala?

F# and Scala are both functional programming langugages that don't force the developer to only use immutable datatypes. They both have support for objects, can use libraries written in other languages ...
35
votes
8answers
3k views

Is memory management in programming becoming an irrelevant concern?

Background I revisited an old (but great) site I had not been to for ages - the Alioth Language Shootout (http://benchmarksgame.alioth.debian.org/). I started out programming in C/C++ several years ...
31
votes
5answers
15k views

Performance of Scala compared to Java

First of all I would like to make it clear that this is not a language-X-versus-language-Y question to determine which is better. I have been using Java for a long time and I intend to keep using it. ...
31
votes
5answers
2k views

Re-inventing system design for Scala

Many, many, moons ago, I did my masters in Object Orientated Software Engineering. I covered everything: project initiation, requirements, analysis, design, architecture, development, etc, etc. My ...
27
votes
5answers
13k views

Is Groovy going away? [closed]

I am sure this question has been asked many times. However, I like to ask it again with the intention of what is the future of these languages. I was first introduced to Groovy and really liked it. I ...
27
votes
3answers
1k views

What are the benefits and disadvantages in the approaches of C#, Java and Scala to Closures/Lambdas/…?

I wonder what the technical implementation differences between C# and Scala are and how both solutions compare to the implementation ideas and concerns voiced in the email Peek Past lambda by Brian ...
25
votes
3answers
2k views

Introducing Scala to a Technical Manager

I've been promoting Scala at work as something we should try out for things like testing with Specs http://code.google.com/p/specs/ and rapid prototyping of web services with tools like Scalatra ...
25
votes
4answers
4k views

What limitations does the JVM impose on tail-call optimization

Clojure does not perform tail call optimization on its own: when you have a tail recursive function and you want to have it optimized, you have to use the special form recur. Similarly, if you have ...
25
votes
2answers
2k views

Applying Denotational Semantics to design of Programs

I've read a bit on denotational semantics (DS) and I'm very intrigued about the process of designing computer programs where types and functions have strong and clear mappings to mathematics. Are ...
23
votes
6answers
3k views

How do you encode Algebraic Data Types in a C#- or Java-like language?

There are some problems which are easily solved by Algebraic Data Types, for example a List type can be very succinctly expressed as: data ConsList a = Empty | ConsCell a (ConsList a) consmap f ...
22
votes
6answers
2k views

Functional programming compared to OOP with classes

I have been interested in some of the concepts of functional programming lately. I have used OOP for some time now. I can see how I would build a fairly complex app in OOP. Each object would know how ...
21
votes
6answers
4k views

Why these attempts to water down Scala with Xtend and Kotlin? [closed]

So now Eclipse has offered Xtend and JetBrains is offering Kotlin - both of which seem to be watered down versions of Scala. My question is why? I've played with Scala a bit and it's not that hard. ...
21
votes
8answers
3k views

Is Scala ready for prime time? [closed]

Now that I've done a few trivial things with Scala (which I love for "hello world" and contrived applications!) I am left wondering.. part about maturity of the tools to support development, and part ...
20
votes
8answers
9k views

Why was Scala not implemented with C or C++

Does anybody know why was Scala implemented in Java and .NET instead of C or C++? Most languages are implemented with Cor C++ [i.e Erlang, Python, PHP, Ruby, Perl]. What are the advantages for Scala ...
20
votes
3answers
4k views

What are the advantages of Scala's companion objects vs static methods?

Scala has no static-keyword, but instead has similar functionality through companion objects. Behind the scenes the companion objects are compiled to classes that have static methods, so all this is ...
19
votes
2answers
3k views

Is Clojure, Scala and other restrained by the JVM vs CLR [closed]

The Java implementors seem slow to adopt language improvements, for example compare C# with full closures, expression trees, LINQ etc.. to Java, and even the push back of some stuff to Java 8 will ...
18
votes
10answers
7k views

What do Java developers think of Scala? [closed]

I've noted that IDE support is nowhere near as good, but the language itself supports functional programming idioms much more cleanly.
18
votes
3answers
5k views

What is the best IDE for Scala? [closed]

I tried programming Scala in Netbeans and Eclipse, but it is not what I'm looking for. In Netbeans suggestions for method names etc. are not working. In Eclipse I can't go to some classes sources by ...
16
votes
3answers
4k views

When is it NOT good to use actors in akka/erlang?

I've been working with akka for 7-8 months now daily. When I started, I would be working on applications and notice that actors would be used basically anywhere once inside the actor system for ...
14
votes
8answers
1k views

How do you encourage your organization to move from Java to Scala? [closed]

Has anybody's organization started the migration from Java to Scala? If yes, how do you do that? What can I do to encourage my colleagues to do the same?
14
votes
4answers
3k views

What is the difference between a Future and a Promise?

What is the difference between a Future and a promise? (In Akka and Gpars.) They look the same to me as both block and return the value of the future when get is called and a promise is to get the ...
13
votes
4answers
2k views

Does functional programming add complexity in code? [closed]

For the entire past year I've been written Scala code (coming from a Java background). I really liked how you could create simpler and cleaner code, with vals, case classes, map/filter/lambda ...
13
votes
2answers
2k views

Do you need to know Java before trying Scala

I'm interested in learning Scala. I've been reading a lot about it, but a lot of people value it because it has an actor model which is better for concurrency, it handles xml in a much better way, ...
13
votes
4answers
951 views

Unit testing statically typed functional code

I wanted to ask you people, in which cases it makes sense to unit test statically typed functional code, as written in haskell, scala, ocaml, nemerle, f# or haXe (the last is what I am really ...
13
votes
1answer
2k views

Which Scala open source projects should I study to learn best coding practices [closed]

What open source projects would you recommend for people to study to learn how the pros write Scala? Some of the attributes that I'm looking for - though they don't all have to be present in every ...
12
votes
5answers
2k views

Is functional programming strongly related to mathematics?

Is functional programming so related to mathematics because much of the functional programming is depicted with mathematical notions? Is it a MUST to have a strong base of maths to learn & ...
12
votes
2answers
3k views

Is there a canonical book on Scala?

I'm interested in learning Scala, but due to is relative newness, I can't seem to find a whole lot of books about it. Is there a book out there that's the de-facto standard for describing best ...
12
votes
3answers
727 views

Historical origins of Scala implicits

Scala has been called complex with its rich feature set by many of my colleagues and some even blamed all those new features of it. While most programmers are aware of the OO-features, and at least ...
12
votes
1answer
902 views

Scala as a language for Generic Programming

In the paper “An Extended Comparative Study of Language Support for Generic Programming” by Garcia et al. an interesting comparison of programming languages features for generic programming is given: ...
12
votes
2answers
2k views

What is the ideal learning path to building Android apps with Scala, without prior Java experience

Unfortunately, there are not currently any books on the subject of 'Learn Android Development with Scala', which would be the ideal solution. I'm guessing that I'll need to pick up at least 3 books ...
11
votes
2answers
1k views

How will the new development of Java influence its interoperability with languages like Scala and Clojure?

As far as I understand, both Scala and Clojure have been designed as new languages that depend on the JVM, and easily integrate with Java code, in the sense that they allow to use Java classes ...
11
votes
3answers
1k views

Scala or Clojure Functional Programming best practices

I did a lot of self-study coding, got some experience with Parallel Programming Models: Actors, Software Transactional Memory, Data Flow. When I am trying to apply these architectures to real life - ...
11
votes
1answer
685 views

(Dis-)advantages of structural typing

I’ve just watched this talk by Daniel Spiewak where he talks about the advantages of structural typing as compared to Scala’s ans Java’s nominal typing. One example for this difference would be the ...
10
votes
2answers
966 views

How is Nothing a subtype of every other type in Scala

I am taking Martin Odersky's coursera course on functional programming with scala, and for now I have learned two things that together don't make sense: Scala doesn't support multiple inheritance ...
10
votes
4answers
4k views

Would scala be a good choice instead of Java?

We will be starting a new project which will involve training all the .net developers in Java (frameworks/ECO system etc). We have a lot of code written in C# and it seems that all of this will be ...
10
votes
4answers
7k views

How Scala Developers Are Being Interviewed [closed]

How are Scala programmers being interviewed? What are the aspects that the interviewer looks for when interviewing a Scala developer?
9
votes
3answers
4k views

Fastest Functional Language

I've recently been delving into functional programming especially Haskell and F#, the prior more so. After some googling around I could not find a benchmark comparison of the more prominent functional ...
9
votes
3answers
1k views

Getters and Setters in Functional Languages

One of the tenets of Functional Programming is the use of Pure Functions. A Pure function is one that is side-effect free and referentially transparent. Getters are not referentially transparent - ...
8
votes
9answers
2k views

OS choice for functional developing

I'm mainly a .NET developer so I normaly use Windows/VisualStudio (that means: I'm spoiled) but I'm enjoying Haskell and other (mostly functional) languagues in my spare time. Now for Haskell the ...
8
votes
5answers
3k views

Is there a clear leader amongst JVM-based languages? [closed]

What is the current status of these projects, and has any one (or two) emerged as a clear leader? To demonstrate my motives for asking this question, cast your mind back several years. Prototype and ...
8
votes
3answers
1k views

What is a “lifted representation”?

Just ran across this term here: http://www.codemesh.io/codemesh2014/viktor-klang "We'll demonstrate the Flow API—a lifted representation—as well as a pluggable way of transforming the lifted ...
8
votes
4answers
733 views

scalablity of Scala over Java

I read an article that says Scala handles concurrency better than Java. http://www.theserverside.com/feature/Solving-the-Scalability-Paradox-with-Scala-Clojure-and-Groovy ...the scalability ...
8
votes
3answers
3k views

Functional Programming approach for a simplified game using Scala and LWJGL

I, a Java imperative programmer, would like to understand how to generate a simple version of Space Invaders based on Functional Programming design principles (in particular Referential Transparency). ...
8
votes
3answers
933 views

Is duplicate syntax for defining named functions a bad language design decision?

I am modelling a programming language for fun, and the syntax is heavily influenced by Scala - specifically function definitions. I have encountered a design problem because my language does not ...
8
votes
4answers
678 views

Design in “mixed” languages: object oriented design or functional programming?

In the past few years, the languages I like to use are becoming more and more "functional". I now use languages that are a sort of "hybrid": C#, F#, Scala. I like to design my application using ...
7
votes
6answers
628 views

Built in Scala library slow?

I found this question and accepted answer on StackOverflow. It's related to the slow JSON parser in the standard Scala library. The consensus as it were, is that the build-in JSON library is slow, ...
7
votes
6answers
2k views

What unit test frameworks exist for Java?

I've used TestNG and JUnit. What other frameworks are out there? What makes them special and/or different from the rest?
7
votes
1answer
761 views

Why is the Scala Option type not called Maybe, just as in Haskell?

Why is the Scala Option type not called Maybe, just as in Haskell? Maybe makes a lot more "semantic sense" to me, but maybe Option has different behaviour I am not aware of. Is there any particular ...
7
votes
1answer
1k views

Why does Scala require functions to have explicit return type?

I recently began learning to program in Scala, and it's been fun so far. I really like the ability to declare functions within another function which just seems to intuitive thing to do. One pet ...