Start cooking with cukey F# - Fun Sharp

Fun Sharp or F# is nothing but a developing language same as java. But this is a multi-paradigm programming language for .NET framework. It means programmers can work in a environment which looks like a mixture of every other existing paradigms. The objective of such model is to allow developers to use appropriate paradigm accordingly their needs, they do not need to focus about multiple languages since this implicitly provides intermixing constructs from different paradigms as well as variety of styles. This F# is a functional, OO programming model which is a output as a result of Microsoft Research. Now this is being developed at Micrisift Developper Devision and has been distributed as a completed edition in .NET freamework as a part of visual studio 2010.
This is cukey, isn't it? Cukey is a word defined in urban dictionary as a combination of cute and geeky। What doesn't f# have in its domain;

  • Not a pure functional language though it has first class functional constructs

  • Not a dynamic language

  • Its compiler is open source under apache license, and it is not a closed source

You now know this F in F# stands for FUN, so now we are going to have some fun using a language call F#। Its really funny, you might think every language is funny when we initially start it for studding, but for the time being we realize they are not that much fun as we thought at the beginning। Don't worry, this is fun because they haven't inserted complexity automaton for this येत. We must first look at sysntax of F# and then take a look at how we can compile our F# code। Since ।NET considers about OS X and Linux (think twice why they don't miss them), here also we don't forget about them।

To get started with F# you only need to get your head round 2 keywords, let and fun. You can think of let as var in C# but on steroids and fun as just the preamble to a lambda function (ref: Features in F#). Following table shows let.

There is a slight difference when defining a symbol and defining a variable in F#. But for now important thing you must keep in mind is that let defines constant symbols. When declaring a symbol whose value changes if reassigning is made, then such symbols must be included mutable keyword. Below table depicts that clearly.

If you need to try out more, it is better to have an IDE. Then you can easily debug it and be able to save your time for testing.


Popular Posts