All Questions
Tagged with functional-programming scala
37 questions
75
votes
4
answers
16k
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 ...
69
votes
4
answers
13k
views
Is functional programming faster in multithreading because I write things differently or because things are compiled differently?
I'm diving into the world of functional programming and I keep reading everywhere that functional languages are better for multithreading/multicore programs. I understand how functional languages do a ...
37
votes
4
answers
22k
views
Why would I not need an ORM in a functional language like Scala?
I'm wondering if I can switch from Java to Scala in a Spring + Hibernate project to take advantage of some Scala features such as pattern matching, Option and what it seems to me a cleaner syntax in ...
36
votes
7
answers
12k
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 ...
23
votes
5
answers
10k
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 & ...
20
votes
1
answer
14k
views
Passing a Scala function to a Java 8 method
The following Scala code works and can be passed to a Java method expecting a function. Is there a cleaner way to do this? Here's my first pass:
val plusOne = new java.util.function.Function[Int,...
19
votes
3
answers
21k
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 ...
18
votes
4
answers
3k
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 ...
15
votes
4
answers
2k
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
1
answer
6k
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 ...
12
votes
1
answer
8k
views
Pattern matching in Clojure vs Scala
What are the key differences between pattern matching in these two languages? I am not referring to syntax, but capability, implementation details, range of use cases and necessity.
Scala ...
12
votes
3
answers
5k
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). ...
11
votes
3
answers
2k
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
4
answers
2k
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 ...
9
votes
3
answers
5k
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 - ...