tags:

views:

630

answers:

7

I've been wanting to learn F#, but I can't see its usefulness (for business purposes) for the following reasons:

  1. Not many people are fluent in F#. If a company implements a business solution in F#, the cost of programmers goes up and the maintainability of the software is curtailed.

  2. C# and F# both generate IL and run on the CLR. Since it all compiles to the CLR, I can't see any reason to write software in F#.

Am I missing something? Or can F# safely be avoided?

+6  A: 

You should try searching for [F#] [subjective] for starters.

http://stackoverflow.com/questions/385973/is-f-going-to-become-a-mainstream-language

http://stackoverflow.com/questions/328329/why-should-i-use-f

http://stackoverflow.com/questions/179332/anyone-actually-using-f-in-production

http://stackoverflow.com/questions/161125/whats-wrong-with-f

http://stackoverflow.com/questions/159356/why-is-f-so-special

Benjol
Sorry I didn't find those when searching; however, thank you for the links they answered my question enough.
csharptest.net
Yeah well, I kind of did the search backwards - I already knew the questions existed, so I just had to work out the shortest search term to get them :)
Benjol
+2  A: 

F# may not find it's way into your mainstream projects at work, but that does not mean it is not worth learning. As a functional language many developers can stand to learn from F# (or any other functional language, really). It provides an interesting perspective on how to code solutions to problems different from a traditional non-functional OO approach. And this knowledge can translate effectively into how to solve problems with your C# in a different (and sometimes better way) using the "functional" features found in C# - such as anonymous functions and lambdas.

Matt
+4  A: 

Learning a new language is not always about finding a practical application for it within your organization. Sometimes, the benefit comes from learning new ways of thinking about solving problems. F#, being a functional language, provides insights into how functional programming techniques can be used to solve certain kinds of problems - and, similarly, where it is not the most effective approach to problem solving.

Such lessons can be transferred to any programming environment - even those that are not purely functional.

LBushkin
+2  A: 

F# simply adds another way to express programing related concepts to your arsenal. I suspect you won't have to use them often, but there may be ideas which you may find easier to maintain or represent in F# than C#. If you don't know the technology, if a client asks about it it will be a lot harder to explain why you don't want to use it in the situation at hand.

So in closing - I'd say you should at least learn the basics of F# - enough for you to make a personal decision about whether you could make use of it, or at least explain to clients why you think it doesn't offer the advantages their buzz word reading bosses think it might.

Streklin
+5  A: 

What is probably more important for an architect is an understanding of some of the aims behind functional programming. This you can gain from reading up on F# or other functional languages such as lisp.

These include concepts such as "purity" which is easily summarised by saying that no shared state is allowed. For parts of an architecture that relies on serious performance (i.e. needs to be parallelizable) or needs to be transactional, "functional style" code should be seriously considered.

Quibblesome
-1: Purity is usually seriously bad for performance and, in particular, parallelism.
Jon Harrop
Erm.... don't you mean the opposite or are you being sarcastic? Or perhaps we have different interpretations of purity?By purity I mean no operation has hidden side effects, like the ones you would get in a system with a lot of static and/or global variables or a lot of persistent object references. Parallelism REQUIRES purity to operate. You cannot parallelise something that isn't pure because workerA might affect the work of workerB. Each block of work needs to be pure.
Quibblesome
+1  A: 

Yes, via Haskell. The concepts are important. I now use them in my C# code. mutable types I never really paid any attention to and thought my code was tight for threading. That is until you look at functional programming and realise that there are holes. Big holes.

I love F# and would like to get more into it on a work front. I must admit that those Object and Classes and the paradigm that has governed the last decade have proven to be a white elephant apart from those inherited bank account examples you see in all books.

Code written in a functional/generic Decomposable fashion is more robust than classes hierarchy.

Lambdas

IGA