0

Possible Duplicate:
In what areas might the use of F# be more appropriate than C#?

I'm trying to figure out what scenarios you would want to use a functional programming language like F# over other languages like C#. I know every programming language has it's own strengths which determine when you do and do not want to use it, and I'm trying to figure out F#'s strengths.

So far it seems like F# is only superior for things like database mining and running scientific simulations. Are there any other reasons why you would want to use F#? Or are object oriented languages like C# the better choice for the majority of applications?

Thanks

Community
  • 1
  • 1
Zain Rizvi
  • 23,586
  • 22
  • 91
  • 133
  • See also http://stackoverflow.com/questions/5282782/in-what-areas-does-f-make-absolute-no-sense-in-using and http://stackoverflow.com/questions/2785029/in-what-areas-might-the-use-of-f-be-more-appropriate-than-c and others – Brian Mar 14 '11 at 09:02
  • 2
    Look at the highest voted F# questions: http://stackoverflow.com/questions/tagged/f%23?sort=votes&pagesize=50 Most of them answer exactly this question. – Tomas Petricek Mar 14 '11 at 09:18
  • 3
    As long as C# does not have algebraic data types and pattern matching, there is no point in choosing C# over F# for anything. These features are too addictive and it is really hard to give up using them. – SK-logic Mar 14 '11 at 10:26

2 Answers2

3

You should have a look at

http://msdn.microsoft.com/en-us/fsharp/gg634701

or

https://msdn.microsoft.com/en-us/library/gg634701.aspx

zawhtut
  • 229
  • 2
  • 14
Brian
  • 117,631
  • 17
  • 236
  • 300
2

Strongly typed functional languages have one big advantage: many more bugs are caught at compile time, and they generally force you to think harder about what you're doing and how you're doing it (e.g. putting as much of the logic as possible into the types, so that many logic errors become compile-time errors) so you're more likely to avoid logic errors.

geekosaur
  • 59,309
  • 11
  • 123
  • 114