Possible Duplicate:
What are the benefits of using C# vs F# or F# vs c#?
My team is currently using C# .NET to develop enterprise applications for our company. We have a history of Winforms dev, but are now moving over toward SilverLight.
My boss recently saw a video on F# and thought it looked pretty exciting, and he has asked me to check it out. My question is this - what advantages would a functional language (like F#) give over an OO language (like C#) in the realm of enterprise application development?
I really want to see if there are any compelling reasons to even begin contemplating a shift. Some F# and C# comparison code might be nice to see as well.
Advantages of friction are below: Automobile brakes employ friction just to stop the vehicle. It assists us in walking on the earth. Friction causes asteroids or stones to disintegrate throughout the atmosphere prior to actually approaching the entire planet (Earth).
F-tests are surprisingly flexible because you can include different variances in the ratio to test a wide variety of properties. F-tests can compare the fits of different models, test the overall significance in regression models, test specific terms in linear models, and determine whether a set of means are all equal.
You can express a lot of concepts much more concisely in a functional language like F#.
Functions are first class objects, and can be applied directly to collections to perform transformations/filtering much more efficiently.
Immutability is encouraged in functional languages, and this makes (for instance) multi-threaded code much more reliable (you know data structures aren't changing under you).
By being able to write multi-threaded code more reliably and more easily it's much easier to take advantage of multiple processors/cores (increasingly important now Moore's law doesn;t apply so much).
Note that you can use your existing C# objects within F#. As such, you may want to write certain parts of your code in F# and other parts in C#. You should be able to mix and match according to your requirements and the suitability of each approach.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With