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.
-1
votes
2answers
109 views
Am I barking up the wrong tree with Scala?
Having some spare time, I've decided to learn a new programming language while developing - for fun, will never see the light of day - an insurance administration web application (insurance is the ...
7
votes
2answers
114 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 ...
2
votes
3answers
133 views
How to name nested function?
When you have a function that wraps another one in Scala. What do you call the nested function?
I found this :
def factorial(i: Int): Int = {
def fact(i: Int, accumulator: Int): Int = {
if ...
2
votes
3answers
184 views
Does macros support make Scala a Lisp dialect?
I've read recently that macro support in Scala is now official. I checked the documentation page and they are reminiscent to the LISP ones. In one of his essays Paul Graham writes that when "you add ...
2
votes
4answers
207 views
How to promote Scala to the management?
As a developer I like Scala and could tell the management about technical benefits of the language. But even if management understands that a superior technology has business impact, I fear that they ...
4
votes
4answers
350 views
Big switching from one platform to another [closed]
As an example I want to switch from C#/.NET to Scala/Jvm. I'm working as a self-employed and I'm free to choose my favorite language/platform. Having more than 8 years of experience in C#/.NET leads ...
7
votes
1answer
302 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 ...
4
votes
4answers
270 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 ...
2
votes
2answers
154 views
Should I use semicolons to delimit Scala statements?
I'm used to delimit statements by a semicolon from Java, so naturally I do it in Scala code too. I also feel that the code is easier to read, because it's evident where one statement ends and another ...
2
votes
1answer
317 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
160 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",
...
0
votes
1answer
103 views
Scala string interpolator: ad-hoc feature of general construct?
In Scala 2.10 a new string interpolator feature has been added (see here).
For example
val name = "James"
println(s"Hello, $name") // Hello, James
What is not clear to me is whether this feature ...
5
votes
2answers
362 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
...
6
votes
5answers
2k views
Is Clojure's syntax really simpler than Scala's? [closed]
Argument which is always made in favour of Clojure is that.
The syntax is simpler and there is only one way of expressing code with no complicated rules.
However Scala has loads of different types ...
4
votes
4answers
469 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 it's interoperability with Java and its similar syntax. One thing that I found strange is the use of the _ operator for package wilcard imports ...