0
votes
2answers
53 views

Map multiple functions over a single data item [closed]

I'm in the process of learning Scala and I came across a scenario today where I need to map multiple functions over a single piece of data and wondered if there was a formal name for this. It sort of ...
5
votes
3answers
192 views

Decreasing vars in Scala programs

I have been studying scala for the past week or so and the ideologies associated with it and functional programming in general. As expected, the leap from imperative to functional programming is not ...
7
votes
1answer
572 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 ...
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 ...
4
votes
1answer
218 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 ...
-4
votes
2answers
226 views

Am I barking up the wrong tree with Scala? [closed]

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 ...
21
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 ...
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 ...
6
votes
3answers
460 views

Functional Methods on Collections

I'm learning Scala and am a little bewildered by all the methods (higher-order functions) available on the collections. Which ones produce more results than the original collection, which ones ...
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 ...
1
vote
2answers
920 views

Performance of concurrent software on multicore processors [closed]

Recently I have often read that, since the trend is to build processors with multiple cores, it will be increasingly important to have programming languages that support concurrent and parallel ...
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 - ...
5
votes
6answers
367 views

Do non-pure interpreters still make the guarantees of functional programming?

I am assuming the implementations/compilers/generated C code (referred to hereinafter as generic, 'interpreter') for most functional programming languages are written in non-pure functional languages. ...
8
votes
4answers
671 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 ...
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). ...
13
votes
4answers
942 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 ...
6
votes
5answers
716 views

Help me deal with higher level languages [closed]

I'm trying to learn Scala (I have previously glanced at Erlang, Haskell, Ruby and had similar issues). I do enjoy it, but I feel bad about some things it does and I wonder if that's just due to all ...
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 - ...
1
vote
4answers
559 views

Usage of “Multi-Paradigm Languages” in commercial applications

I am currently learning the two languages F-Sharp and Scala. These two languages are, in my opinion, both quite comprehensive to grasp. Nonetheless, what seems to make Scala and F-Sharp similar, is ...
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 & ...
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 ...