1
vote
1answer
75 views

What is the value of a let expression

From what I understand, every code in f# is an expression, including let binding. Say we got the following code: let a = 5 printfn "%d" a I've read that this would be seen by the compiler as let a ...
3
votes
1answer
153 views

Have enterprises adopted pure FP to create desktop user interfaces? Examples? [closed]

I see some evidence (F#) online that functional programming is penetrating enterprise. Where I work we primarily develop VB.NET WinForms applications. The .NET infrastructure for developing ...
7
votes
4answers
917 views

Is pattern-matching against types idiomatic or poor design?

It seems like F# code often pattern matches against types. Certainly match opt with | Some val -> Something(val) | None -> Different() seems common. But from an OOP perspective, that ...
5
votes
4answers
589 views

From a high level programming perspective, where does the 'different-paradigm' barrier between C# and F# really kick in?

I'm aware that they both use different programming paradigms, but from a high level perspective apart from differing syntax it seems most basic tasks can be achieved in similar fashion. I only say ...
25
votes
1answer
2k views

Why is an anemic domain model considered bad in C#/OOP, but very important in F#/FP?

In a blog post on F# for fun and profit, it says: In a functional design, it is very important to separate behavior from data. The data types are simple and "dumb". And then separately, you ...
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 ...
18
votes
3answers
827 views

Why is the rec keyword needed in F#?

In F# it is necessary to use the rec keyword. In Haskell there is no need to explicitly tell if a given function is recursive or not. Given the role of recursion in functional programming, the F# ...
2
votes
2answers
396 views

How do functional languages handle a mocking situation when using Interface based design?

Typically in C# I use dependency injection to help with mocking; public void UserService { public UserService(IUserQuery userQuery, IUserCommunicator userCommunicator, IUserValidator userValidator) ...
21
votes
5answers
2k views

How to make the transition to functional programming?

Lately, I have been very intrigued with F# which I have been working a bit with. Coming mostly from Java and C#, I like how concise and easily understandable it is. However, I believe that my ...
8
votes
4answers
677 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
4answers
5k views

Example of where Functional Programming is Superior to Imperative or Object-Oriented Programming? [duplicate]

Possible Duplicate: Which problems domains are more suited to functional programming solutions I've been reading about functional programming. I've been using mostly C#.net recently, and ...
5
votes
3answers
832 views

How can I translate ML code to F#?

Recently I found a book, Purely Functional Data Structures and all the examples in this book are given in ML with Haskell versions in its appendix. But I only know one programming language with the ...
13
votes
5answers
515 views

How should someone used to FP thinking read imperative code?

I graduated from university about five months ago, and have been working in a local startup for past four months. While at university, I studied Haskell, F# etc on my own. We were taught Java at the ...
1
vote
4answers
560 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 ...
11
votes
4answers
906 views

Functional Programming — Immutability

I am trying to understand dealing with immutable data in FP (specifically in F#, but other FP’s are ok as well) and break the old habit of state-full thinking (OOP style). A part of the selected ...
7
votes
6answers
925 views

Reading SICP with F#? [closed]

I've been meaning to read the SICP book for a while, and am finally about to get around to it (now that I can read it on Kindle :) I'd like to learn a functional language, and I use C# at work so ...
10
votes
7answers
1k views

Arguments for Functional Programming [closed]

I've recently been learning F# for fun (I'm a VB.NET/C# dev), and I really like some of what it has to offer. Theoretically that is. But I'm having trouble thinking up of scenarios where I would ...
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 ...