Sdílet prostřednictvím


F#: Really briefly, for today

F#, What the heck is F#?  First of all it is a functional language that supports Object Oriented Programming, which is weird.  One of the past languages that are functional in nature is FORTRAN,  a language that was first created in 1953 and is still used in many engineering simulations.  It is safe to say that FORTRAN put the US on the moon.  So if F# just another FORTRAN?  No, F# is related to OCAML (Oh-camel), but is a light version of OCAML.  It does all kinds of wonderful things, and especially keeps the art of programming in a state of confusion, which is fine for me.

  • Will F# replace C#? No
  • Will C# replace C#? Uh?  Oh I get it, this will be explained later
  • Can F# do what a programming calculator do? Yes
  • Why is it a big deal?  It’s not, but it’s useful

So what is up with the C# replacing C# statement?  In coding the statement x=x+1, in math, in some cases it would be seen as incorrect, F# would find that this is also unacceptable, to be covered later.

To get started, if you have Visual Studio 2010 Pro or Visual Studio 2010 Ultimate then you got F#.

If you don’t have either one of those products, or don’t want to use them, then you can utilize F# with a Visual Studio 2010 Interactive Shell or even without a shell.

If the latter case go to: https://www.microsoft.com/downloads/en/details.aspx?FamilyID=effc5bc4-c3df-4172-ad1c-bc62935861c5&displaylang=en and download both of the files, Run the installation.

If you want to experiment with the VS 2010 Interactive shell, it can only be seen on a machine without VS pro or VS ultimate, in those two cases F# is included so the interactive shell turns itself off.  Download the VS 2010 Interactive shell and install it.

https://www.microsoft.com/downloads/en/details.aspx?FamilyID=8E5AA7B6-8436-43F0-B778-00C3BCA733D3

XAML can be used with F# and is usually the way that the user interface is developed.  It is possible to use F# with the XNA and Phone, but it isn’t recommended.

Hope this gets you started!