views:

2175

answers:

8

I recently heard about F# in coming.

I wonder why .NET world need another programming language ?

What the deal?

Is there a problem that C# cant solve and F# can?

Is F# a dynamic language?
[Update :Be careful not to confuse type inference with dynamic typing.
Although F# allows you to omit types when writing code,
that doesn’t mean that type checking is not enforced at compile time.]

Is there any possibility that F# be more popular than C# or its just for the specific problems ?

+92  A: 

Is there a problem that C# can't solve and F# can?

No.

Is F# a dynamic language?

No.

I thought F# is a dynamic language ! So what kind of language is F#?

F# is a functional language similar to OCAML. It is statically typed, not dynamically typed. It supports compile-time type inference.

Is there any possibility that F# be more popular than C#?

Yes.

Why may F# be more popular than C#?

F# is an excellent language. People might like it better than C#.

Yes but I am looking for the reasons.

People in the future might like F#, a functional language that supports object-oriented programming better than C#, an object-oriented language that supports functional programming. Tastes change; there is an increasing interest in the industry for using techniques from functional programming.

I want to know more about F#.

Then read this:

http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/

and this:

http://en.wikipedia.org/wiki/F_Sharp_(programming_language)

and this:

http://msdn.microsoft.com/en-us/fsharp/default.aspx

and this:

http://msdn.microsoft.com/en-us/library/dd233154(VS.100).aspx

and this:

http://blogs.msdn.com/dsyme/

Eric Lippert
I like the last answer, given Eric's involvement with C# !
Mitch Wheat
So whats the deal ? Why may F# be more popular than C#?
ali62b
+1 for last answer. >Is there any possibility that all programmers be scientists
Sergey Mirvoda
Yes but I looking for the reasons. and i want to know more about F#.I wanted to know what kind of language is F# at all?
ali62b
This is a great answer to a pretty insipid question.
Onorio Catenacci
"People might like it better than C#." made me laugh!
Mehrdad Afshari
I wouldn't really call F# "object oriented". Sure, it can consume and define objects/classes but have you ever tried writing more complex systems in F#? Having to put all mutually dependant classes in one file is a just mess. And no, you can't forward-declare functions/classes or share header files. Writing OO-Code in F# is like writing functional code in C#: Not very pretty.
SealedSun
I wouldn't call F# object-oriented either.
Eric Lippert
+1  A: 

Proformance compare: http://stackoverflow.com/questions/144227/c-f-performance-comparison

refactoring in parallel and generics : http://tryingthisagain.com/2008/04/16/c-vs-f-some-parallel-refactoring-and-generalization/

f# will get a huge push from MS, but C# will maintain it's user base I believe.

James Campbell
+1  A: 

it's a new modern language allow's you programming in functional paradigm. i did not investigate on F#. but pre assumable it's an answer to rise of scala (http://www.scala-lang.org/) and of course liftweb (http://www.liftweb.com/). basically now on you can use objects as top level containers and you can use inner functions (more like javascript), you will be able to pass functions as values etc.

trends on programming languages are changing, classical oop is old and people looking for new languages for expression power and extensibility. on that phase functional languages comes to help.

ilhan negis
+4  A: 

F# is a functional language. It encourages a programming style of more functions and side effect free functions. This may be an advantage when you need to utilize a many-core processor.

I think you can program anything in both C# and F# but they have different "styles". (C# got a big dose of the "functional mindset" with LINQ)

Arve
+2  A: 

1 tool doesn't fit all needs.

Did Asp.Net MVC replace Asp.Net Forms ? No, both are used according to the project needs.

Did Vb.Net replace C# ? No, both provide almost same functionality and options but pull developers from both families. Vb and C.

Has WPF replaced, WinForms ? not yet, might in future.

Chris Smith's on his Blog, says

" But just because you can write code in a new language doesn't mean you should. So why use F#? Because being a functional language, F# makes writing some classes of programs much easier than its imperative cousins like C#. Parallel Programming and Language-Oriented Programming are two such domains that can be expressed easily in F#.

If you’ve ever written a .NET application and found yourself fighting against the language to get your idea expressed, then perhaps F# is what you’ve been looking for."

want to learn more, check this

Hope it helps

Asad Butt
+2  A: 

Is there a problem that C# can't solve and F# can?

The problem to solve functional problems concisely.

Dario
+2  A: 

Eric's answer is a good one, but I wanted to touch on this point:

"Is there a problem that C# cant solve and F# can ?"

Yes, but not technical problems per se. One problem that F# solves that each iteration of C# only scratches on is the problem of high ceremony, high verbosity and general lower readability. Recent versions of C# touch on this problem by introducing more type inference into the C# language (ex: the var keyword), but being a C dialect, it can never solve it completely.

You'll find that if you just try it, you can express simple ideas more simply, more concisely, than you can with C# and OOP.

Shaun
+2  A: 

F# basically uses a different paradigm. I'm sure, that when you started programming you had functions all over the place, and thought "Wait? A class? Now what would I need that for?" - Well, at least I did :) I think this is the normal human way of thinking. Over the years though, I've learned to think in the OO-way instead, and now see "Yikes, a global function? What were they thinking?". It's basically different ways to look at a problem.

Now, this holds true for all functional languages, but as a sidenote, I'd like to add that F# is probably the most experimental of all the CLR languages that Microsoft works on. It's often here that new and smart constructs get implemented first, but also changed most often. F# is - at least to some extent - Microsofts playground.

cwap