LEARNING F# instead of c#

F# is language based on ML, which is an impure functional language
(in fact, it is based on language called OCaml that adds several features to
the standard ML). Functional languages are very different from imperative
languages (most of the widely used languages like C++, Java and C# are
imperative). The biggest contribution of F# is that it shows how functional
languages can be compiled for the .NET runtime (CLR), because .NET CLR
was initially designed for executing code written in imperative languages.
Another aim of F# is the interoperability with other languages targeting the
.NET platform. Part of the F# related research is also the ILX [6] project that
shows how .NET runtime could be extended to provide better support for
functional languages (like first-class functions).
Functional programming in general were big inspiration for some of
the C# 3 features and the F# research language already showed how these
features can be implemented for the .NET platform. C# 3 includes constructs
that were inspired by type inference (ability to deduce the type of
expression), tuples (data types that represent pair of values), first class
functions (ability to take function as a parameter and return it as a result),
lazy evaluation (ability to evaluate expression only when it is later needed)
and meta-programming (ability to manipulate with program source code).
Most of these features that were added to C# 3 are very limited when
compared with their implementation in F# and other functional languages,
but it is very interesting to see how functional concepts are becoming more
and more important and can benefit to the non-functional languages.

Now we can see some coding sample which clearly explain why u may want to use F# instead of c#.

see a c# sample

using System;
namespace ConsoleApplication1
 class Program
              static int a()
                           return 2;
             static void Main(string[] args)

and same code when u write in f# u just have to write


open System
let a = 2
Console.WriteLine a

JUST 3 line execute same output!!!!!!!!!!!!! its called ml language.

Now its ur choice to decide.

referenced by

Tomáš Petříček (tomas@tomasp.net)
Faculty of Mathematics and Physics,
Charles University in Prague


The F# Team

Microsoft Developer Division

Microsoft Research, Cambridge

About kishor datta gupta

Graduate Research Assistant at University of Memphis Software Engineer at Silicon Orchard LTD. Former Research Assistant at Lamar University Former Software Engineer at Samsung R&D Institute Bangladesh Studies Ph.D. Computer Science at University of Memphis Studied Masters of Science in Computer Sciences at Lamar University Studied BSC in CSE at Khulna University of Engineering and Technology Studied HSC (completed) at Chittagang college 04-06 Studied High school at ST. Placid's High School'04 Studied Junior Secondary School at Saint Mary's School Lives in Memphis, Tennessee
This entry was posted in F SHARP and tagged , , , , , , . Bookmark the permalink.

1 Response to LEARNING F# instead of c#

  1. Pingback: BEGINING F# Tutorial with visual studio 2010 beta 2 « Kishordgupta's Blog

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s