F# is a succinct, expressive and efficient functional and object-oriented language for .NET which helps you write simple code to solve complex problems.

learn more… | top users | synonyms

8
votes
1answer
248 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 ...
2
votes
1answer
73 views

How to serialize and deserialize lambda expression in F#?

I serialized lambda expressions in C# before. Now I wanna use F# instead of C# for serialization and deserialization. I heard F# is better in this area. Is it true? How can I do that with F#? I’d ...
5
votes
2answers
251 views

Use Queue<T> or stick to native f# lists

I need something that represents a queue in F#. The queue will be filled with items once, and (as the application progresses) items will be taken from this queue and moved to other lists. Should I ...
19
votes
1answer
852 views

Y combinator and tail call optimizations

The definition of a Y combinator in F# is let rec y f x = f (y f) x f expects to have as a first argument some continuation for the recursive subproblems. Using the y f as a continuation, we see ...
6
votes
3answers
1k 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 ...
3
votes
1answer
216 views

Why Does F# Contain Both Modules and Namespaces?

I've been assuming that F# includes the module keyword in addition to the namespace keyword due to backwards compatibility with OCaml. Is this the only reason for the inclusion of the module keyword ...
5
votes
1answer
193 views

Are There Other Use Cases For F# Type Providers?

So I think I know the main use case for F# 3.0's Type Providers, i. e. better Intellisense when working with data stores that use them. Are there other use cases for Type Providers or is that pretty ...
3
votes
1answer
278 views

When do you use a class instead of a record when you do not want to use mutable fields?

I'm imagining a situation where you are creating an F# module in a purely functional style. This means objects do not have mutable fields and are not modified in place. I'm assuming for simplicity ...
8
votes
3answers
365 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# ...
27
votes
5answers
3k views

Why does F# have an interactive mode but not C#?

F# comes out of the box with an interactive REPL. C# has nothing of the sort and is in fact kinda difficult to play around without setting up a full project (though LINQpad works and its also possible ...
1
vote
2answers
236 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) ...
0
votes
1answer
639 views

Database Driven Web Application, C# Front-End and F# Back-End meaning

Hi I am an intern working with ASP.NET. My current task is to make a website which will incorporate some jquery viewing features. This project seems to me will be primarily dealing with reading data ...
13
votes
5answers
1k 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 ...
6
votes
3answers
366 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 ...
11
votes
3answers
3k views

F# performance vs Erlang performance, is there proof the Erlang's VM is faster?

I've been putting time into learning functional programming and I've come to the part where I want to start writing a project instead of just dabbling in tutorials/examples. While doing my research, ...
9
votes
4answers
2k 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 ...
10
votes
3answers
622 views

Should you use C# and F# together

I know you can use C# and F# together in the same project however i'm not sure if its a good idea to do so. It seems to me that mixing two very different coding styles (functional vs OO) could cause ...
4
votes
3answers
519 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 ...
8
votes
2answers
602 views

Is using F# good enough for learning the important functional programming concepts of Haskell?

I'm coming from Linux and Ruby. I've been interested in learning more functional programming, and in particular the ML-ish style. I've tried reading through the Real World Haskell book and trying some ...
12
votes
5answers
457 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 ...
14
votes
1answer
1k views

Does F# offer anything particularly useful for database-driven web development?

My organization finally upgraded to MS Visual Studio 2010 this year. One of the big new features that Visual Studio 2010 offers is the F# programming language. I understand that F# offers a ...
1
vote
4answers
463 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
728 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 ...
3
votes
2answers
357 views

are f# computational expressions a form of aspect oriented programming?

are monads, or more specifically f# computational expressions, a form of aspect oriented programming? Update: f# workflow builders have methods other than bind and unit. They have hooks for lots of ...
7
votes
6answers
702 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 ...
1
vote
2answers
223 views

How to run a F# app in Windows Azure?

I have a project that requires me to write a library management system in F# and using Windows Azure for the development. I am quite new to Cloud concept and i don't know what to do as a next step. Is ...
6
votes
4answers
3k views

What is the F# language? [closed]

I have just learned my first Hello World project in C# and now I have heard there is F#. I was wondering what is it and how is it different from C#?
4
votes
1answer
370 views

What's new in Expert F# 2.0?

I own the first edition of Expert F# by Don, et al. and I'm considering buying the next edition, Expert F# 2.0. But I'm wondering if it's worth it. Sure the syntax will be updated and all, but I'd be ...
10
votes
7answers
925 views

Arguments for Functional Programming

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 ...
0
votes
2answers
188 views

F# open source project hosting using SVN

I'm looking to choose open source project hosting site for an F# project using SVN. CodePlex is where the .NET community in general and most F# projects are hosted, but I'm worried TFS + SvnBridge is ...
30
votes
9answers
2k views

Real world pitfalls of introducing F# into a large codebase and engineering team [closed]

I'm CTO of a software firm with a large existing codebase (all C#) and a sizable engineering team. I can see how certain parts of the code would be far easier to write in F#, resulting in faster ...
5
votes
6answers
509 views

Challenges for the experienced coder to learn functional programming?

What are the challenges that an experienced programmer with the usual C++/UNIX background would face when trying to learn functional programming? The main motive for learning is to gain a fresh ...
6
votes
2answers
2k views

Do you think F# and Python might rule the future market?

I am seeing that Microsoft is concentrating too much on F#. What type of language it is going to be and will it replace the C# user base? In the last few months I am noticing Ruby posts in some ...
36
votes
4answers
2k 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 ...
12
votes
4answers
531 views

What are some good practices when trying to teach declarative programming to imperative programmers?

I offered to do a little bit training in F# at my company and they seemed to show some interest. They are generally VB6 and C# programmers who don't follow programming with too much passion. That ...
1
vote
3answers
193 views

Should I bother with trying to come up with names for these?

If you were to run across code like this in your travels would the short names bother you? let setPropertyAssignment = parser { let! a = setIdentifierName let! b = propertyName ...
18
votes
3answers
1k views

Is there a canonical book on F#?

I'm planning to learn F#. I'm not a very beginner since I know Standard ML, C# and Erlang. Is there a book out there that's the de-facto standard for describing best practices, design methodologies, ...
13
votes
7answers
1k views

What do you think of the F# language? [closed]

What do you think of the F# language? I would like to learn it's positive and negative points. What is your experience with this language? When should or shouldn't someone use F#? See also: F# at ...