Sunday, October 12, 2008

F# Versus C#, VB, and Other .NET Languages

Why F#? What does F# provide that C#, VB, etc. does not?

1. By default, F# uses immutable types, which means that once a type is created, it will not change. This behavior makes the language inherently safe for concurrent operations. With an ever increasing need for concurrency support in enterprise applications, this behavior is becoming more and more desirable. With F#, concurrency related errors such as race conditions, synchronization issues, lock convoys, and deadlocks will be greatly reduced.

2. F# is built on the concept of functions rather than objects. While objects are supported, functions are also first class citizens. Functions can be and passed around like objects in C#/VB. This makes the language extremely well suited for algorithmic computations and makes it easier to achieve efficient processing of lists of data. Since everything compiles to IL, similar performance on these operations could conceivably be achieved with any .NET language, but F# allows optimal performance for specific operations with much less code. Note: In addition to the new abilities, you still have all functionality available in the .NET framework.

3. One of the features of F#, that I have found extremely useful, is the interactive scripting functionality. This allows the developer to select a subset of code and run it like a script. Anyone with a background it SQL will find this functionality very easy to understand and extremely useful for learning/experimenting with the language.

4. Finally, anyone with experience in C# will be thrilled to learn that the immutable aspects of F# will greatly reduce or eliminate the dreaded "Object reference not set to an instance of an object" error.

Note: F# should be added as an addition to an engineer's arsenal, not a replacement for the existing language of choice. My philosophy has always been, use the tool that is best suited for the task. Use F# in places where it can accomplish the task better and/or easier than the other available options.

Many of the points listed here are based on comments/documentation from the following:

Ted Neward: (,

The book "Expert F#" (


  1. Hello - discount lexapro
    Don’t be attracted towards the pirated one.
    [url=]lexapro price[/url]
    The credit for the invention of this Lexapro drug goes to the Lundbeck and Forest Laboratories.
    escitalopram generic
    You should take this Lexapro drug under the experts guidance and make out all the necessary information about it before actually trying it.

  2. meridia cost

    It is important to be conscious of these adverse effects and to seek direct medical attention during its occurrence.
    [url=]meridia drug[/url]

    Consult your doctor for any of the above adverse events. - generic meridia
    Meridia must be combined with a healthy diet, routine exercise plan and behavioral changes to get optimal results.

  3. Hello
    buy clonazepam
    However, discuss whether you have any kind of allergies or not with your doctor.
    [url=]buy clonazepam[/url]

    Do not use Klonopin unless your doctors prescribe you to. - generic clonazepam

    Klonopin is proved to be very effective to treat patients with anxiety depression and panic disorder.

  4. heianji

  5. online dating and meeting [url=]best place to meet singles in colorado[/url] dating game celebrity ancientbrit personals

  6. dating single dad [url=]ult dating[/url] muslim singles france lesbian christian singles

  7. IBM laptop battery [url=]notebook battery[/url] Laptop search and advice laptop comparison
    best laptops [url=]laptop review[/url] Laptops & notebooks Alienware Laptop
    High Quality Laptop Batteries [url=]LG Laptop[/url] Lenovo Laptop Clevo Laptop

  8. this kind of topic is good for people to learn more about it, and that people should be every day less ignorant, and medicine for this is the reading of issues like this

  9. Hello congratulations you did an excellent work with this blog about F# Versus C#, VB, and Other .NET Languages I would like to know more about this topic and please when you have any update contac me please to read it. thanks for sharing!!