Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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 functional programming paradigm, similar to Lisp. Unlike Lisp though, F# is compiled into managed code for the .net framework.

Right now, I work in database-driven web application development. Right now, I'm working with an n-tier application with SQL code on the back end and a C#.net AJAX web application on the front-end. I would like to know if F# offers anything that would be particularly useful for this type of development.

share|improve this question
    
Does your software do any financial or statistical analysis? I am not saying this is what F# is for (it's so much more than that), but it excels in this area and the general "put x in, get y out" sort of thing. –  AndrewC Sep 23 '11 at 14:27
    
By the way you should also keep in mind the associated upkeep of any code written in F#. Are you going to train developers in the language? You don't want to be the only person who understands a particular area of your system. –  AndrewC Sep 23 '11 at 14:49
    
There is no financial or statistical analysis. It's basically just record-keeping –  Rice Flour Cookies Sep 23 '11 at 14:53
add comment

2 Answers

F# doesn't really do anything that C# cant. They all ultimately compile down to the same CLR so there is no single technology that would be amazingly useful to you. You can even call F# from C# and vice versa.

Depending on the problems your designing F# could provide simpler and more concise code.

Functional languages also lend themselves very well to unit testing. That and that fact that there is much less mutable data means your code if written well will have much less bugs.

I can say from personal experience learning some F# can really improve your C# skills and help you think of problems in a new way.

Learning functional programming concepts can also really help your Javascript (which is itself a functional language).

share|improve this answer
add comment

One feature that the latest version of F# has that C# does not is Type Providers.

The types provided by F# type providers are usually based on external information sources. For example, an F# type provider for SQL will provide the types, properties, and methods you need to work directly with the tables of any SQL database you have access to. Similarly, a type provider for WSDL web services will provide the types, properties, and methods you need to work directly with any WSDL web service.

The SQL Server type provider is particularly easy to use. Here is a walkthrough on how to use it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.