1
vote
2answers
154 views

If there's no problem treating a statement as an expression, why was there a distinction in the first place in some programming languages? [duplicate]

Why do we have the distinction between statements and expressions in most programming languages? For example, in Java, assuming f and g return ints, this still won't compile because it's a statement ...
2
votes
2answers
155 views

Java: method takes varargs of unrelated types

I have a Java factory method with a varargs array of Objects at the end. The array can contain any combination of Strings and ScaledJpegs. The theory being that an HTML table cell can contain any ...
3
votes
1answer
60 views

When to declare @throws with a Scala annotation - abstract parent or concrete implementation?

In this StackOverflow question I asked about the behavior of the @throws annotation in Scala. Now that I understand how it works I want to ask about best practices with using it. Here's a repost of my ...
0
votes
2answers
89 views

SOAP message testing

I am working in Scala/Java. I'm testing the messaging infrastructure of a part of my system that I did several years ago with CXF and Java. More specifically, I'm re-writing the specification of the ...
1
vote
1answer
291 views

Should we push for more JavaScript on the JVM, alongside Java and Scala? Or, if not, why?

With JavaScript becoming one of the most widely used languages around, I began asking myself why people do not find ways to use it extensively on the JVM. As a programmer who spends half day writing ...
0
votes
1answer
130 views

Type Safety of Spray.io

Yesterday I read a tweet disparaging Jersey with JAX-RS due to run-time errors. Spray.io was mentioned in the tweet: Not even 5 minutes using Jersey / JAX-RS and already a runtime error due to a ...
1
vote
4answers
260 views

Alternatives to null values and option-like types

Related to this question i want to know if there is a concise way to eleminate null values out of code in general or if there is not. E.g. imagine a class that represents a user with birthday as ...
2
votes
1answer
1k views

JSON Library - Jackson or Play Framework? [closed]

Working on a Java and Scala code-base, there's a debate about whether to use Java's Jackson JSON or the Play Framework's JSON Library. After reading the Play JSON Docs, as well as Chapter 9 (JSON) of ...
3
votes
2answers
873 views

Learning Scala, feeling discouraged [closed]

I'm coming from a Java background and trying to learn Scala. At the moment I'm feeling pretty overwhelmed, there seems to be so much more to learn with Scala, so many different ways of doing the same ...
4
votes
1answer
320 views

What kind of problems is an Android beginner likely to encounter in using Scala?

I am a hobbyist programmer who makes and maintains one production system, largely coded in Python, which now has to be ported to Android. I don't know Java at all. However, SL4A in Android makes ...
2
votes
1answer
610 views

Is it worthwile to learn/use Play framework (for Scala or Java) if I don't use the MVC in it

I prefer Single Page Application to server side generated HTML. I am sensible to the pitch of "high productivity" delivered by Play. Now if I don't use the HTML generation part, is it still ...
0
votes
2answers
786 views

How do I initialize a Scala map with more than 4 initial elements in Java?

For 4 or fewer elements, something like this works (or at least compiles): import scala.collection.immutable.Map; Map<String,String> HAI_MAP = new Map4<>("Hello", "World", ...
6
votes
4answers
855 views

Why does Scala use the '_' operator for package import instead of '*' as in Java?

In my opinion, one of the greatest things about Scala is its interoperability with Java and its similar syntax. One thing that I found strange is the use of the _ operator for package wilcard imports ...
34
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 ...
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 ...
6
votes
2answers
1k views

Decision for Unchecked Exceptions in Scala

As a java programmer, I have always been critical of Unchecked Exceptions. Mostly programmers use it as an en-route to coding easiness only to create trouble later. Also the programs (though untidy) ...
2
votes
1answer
2k views

Play 2 with Scala or Java? [closed]

I want to develop a big personal project using Play 2 Framework. I am expert with Java language but it seems, with the few articles I read that Play 2 works perfectly and especially with Scala. I've ...
5
votes
1answer
514 views

Can Scala be considered a functional superset of Java?

Apart from the differences in syntax, can Scala be considered a superset of Java that adds the functional paradigm to the object-oriented paradigm? Or are there any major features in Java for which ...
4
votes
1answer
409 views

Constraints while designing the Java generics

Java generics look quite different from those available in Scala, although both were designed by Martin Odersky. From my point of view, the design of generics in Java is worse, for instance: there ...
22
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 ...
8
votes
4answers
734 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 ...
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 ...
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. ...
3
votes
2answers
232 views

Cross “Machine” Code?

Some languages (mostly ones made in the last 2 decades or so) can now not only run (after some compilation step or directly) on several platforms, but also can be compiled to run on several virtual ...
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, ...
11
votes
1answer
688 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 ...
2
votes
3answers
766 views

Developing a Project in a Statically Typed Language Entirely in VIM [closed]

I've recently started taking Scala to heart (sweet Python, I still love you, but your collections just can't match Scala's), and in doing so am now using IntelliJ IDEA almost entirely for development. ...
2
votes
2answers
485 views

Are there any good Java/JVM libraries for my Expression Tree architecture? [closed]

My team and I are developing an enterprise-level application and I have devised an architecture for it that's best described as an "Expression Tree". The basic idea is that the leaf nodes of the tree ...
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 ...
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 ...
26
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 ...
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 ...
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 ...
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 ...
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 ...
17
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.
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?
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?