tags:

views:

895

answers:

10

Is the F# is the future of programming languages? Is it right time to learn F# ? Any other languages in the market which is equivalent to F#?

+2  A: 

Well, it never hurts to know another programming language, and another way of looking at things.

As F# is unstable right now, as a language that hasn't been officially released yet, it may not be the best time; however, I'd still learn it now.

TraumaPony
A: 

As F# is basically "Functional Programming for .Net" there are a number of similar (and possibly more mature languages) such as:

  • Scala: Functional programming on the JVM.
  • Haskell: Functional programming with native code (or at least a barebones runtime).
Aaron Maenpaa
+5  A: 

F# is a general-purpose, object-oriented functional language and there isn't anything about it that's specifically designed for domain-specific languages, although you can probably easily create a DSL within F#.

If you're really interested in learning something like F#, then now is the right time. If you want to learn a new language to increase your chances at getting hired, then F# might not be a good choice if you still aren't familiar with functional programming. You might want to try JavaScript, Python, Ruby, or C# and use anonymous functions.

If you want to stick with something close to F#, there's anything in the ML family of languages, particularly OCaml. Haskell is a pure functional language in that there are no side effects (except for in Haskell's monads). There's also the Lisp family, Nemerle, and several others.

Mark Cidade
A: 

If you want to do functional programming, go Common LISP. It's cross platform, very stable, and has been around for a long time. It's also part of the LISP family; one of the best-known functional languages.

Paul Nathan
+2  A: 

Functional languages have been around for a long time, but have lacked the practical eco-system to make them relevant to all but the very-specialist business developer (e.g. an a major investment bank that can used to be able to throw some resources at functional programming for complex algorithms).

Microsoft's effort is different, not in the purity of the F# language, but rather its planned debut as a first class citizen of a major programming platform (.NET) and the likely very low friction that the adopting programmer will encounter as he/she adds it to his/her existing infrastructure.

In .NET, one can already reference a VB project from a C# project (or vice-versa) in a single solution. But since the resulting intermediate language of C# or VB is practically identical1, .NET programmers today prefer to stick w/ one language (C# or VB) and engage in smack talk w/ those programmers hailing from the other (nearly identical) dark side.

F#, on the other hand, will introduce a distinctly different language tool. Hence, you'll be able to keep programming in your favored .NET environment (C# or VB), but when a distinct functional subproject arises, you'll be able to program that subproject in F# while still using all of your existing C#/VB assets.

As to the future, many think it's not so much the one-size-fits all language, but rather lowered friction in choosing the right tool for the subproject/task at hand.

In terms of a product release, Microsoft has stated that it is committed to delivering F# as part of the .NET family, but at present has released only a couple of CTPs (not beta-status yet), so I'd say there's no rush to drop everything to learn F# right now. (Ask me again when I see a beta.)



1XML literals in VB 2008 is likely the most distinct VB vs C# difference.

6eorge Jetson
+1  A: 

F# is not the future of programming languages. In fact its deeply rooted in the past. However, it is a great technology to learn, as it most likely represents an entirely different way of thinking about programming than what you are probably used to.

Further, along with dynamic typing, functional programming is one of the concepts that has been slated for greater inclusion in the next version of the c# language.

But, go forth and learn!

Travis
A: 

Any other languages in the market which is equivalent to F#?

F# is basically a Microsoft clone of OCaml. See F# and OCaml – differences in detail.

Hugh Allen
It used to be.. but I think that there are meny significant differences now. Actually, I have the impression that the overall programming style is quie different in F# now than it was in F# +/-2 years back and in OCaml... but I don't have huge OCaml experiences.
Tomas Petricek
+1  A: 

F# and functional programming is the future. But so is the rich flora of OO oriented languages, procedural languages and declarative languages that already exists. None of the concepts underpinning either is new in any sense. With strong runtime integration the future for polyglot (multi-(programming)-language) systems is looking bright and that's probably one trend that will change the landscape.

And yes this is a fantastic time to learn F# the community is small vibrant and lush, the platform is maturing nicly (don't forget that F# was started 2002) and will soon be part of Visual Studio.

As for other languages, as been said F# borrows heavily from Ocml, to the degree that it's possible with some fiddling to cross compile code between the two. F# also borrows sequence expressions and workflows (mondas) from Haskell. Scala is another intresting language in the same niche. Also functional constructs are making their weay into "traditional" languages like C# 3.0, C++ (getting lambdas any day now..). Python has nice libraries for writing functional code. Linq and PLinq are essentially functional/declerative in nature.

Lisp is the granddaddy of the whole thing and quite smug about it too!

Torbjörn Gyllebring
+2  A: 

I'd say now is a good time, I sent a question to fsbugs last week, and the answer came back within a couple of hours from the man himself.

Now try that with c#...

Benjol
+1  A: 

Re the "future" - FP is just another tool in the box; sometimes an FP solution is very helpful, and sometimes it isn't so much. But remember that C# gets increasingly good at the functional side each iteration [although it is unlikely to ever offer some of the very specific FP aspects of F#, such as discriminated unions etc].

Likewise, easier immutability has been discussed by the C# team, so lets keep our fingers crossed for a future C# version. And also bear in mind that the parallel extensions / parallel LINQ bring many of the FP "killer features" directly into every .NET language.

Personally, I very much doubt that it [F#] is going to balloon and that we're all going to suddenly switch to F#; for most business-centric goals, C# still makes a lot more sense IMO, aspecially if designed for testability (you can write bad code in any language...).

But if you're in one of those areas in which FP makes sense, and you're using .NET, then F# is definitely worth investigation.

Marc Gravell