CONTRACT DEVELOPER

F#

F# is the latest development tool included with Visual Studio. Unlike the previous offerings, F# is much more abstract.

While F# is a programming language its easy to ask, why do we need yet another tool? Its true that there are over 1000 different programming languages. Beyond their differences, the conception and genesis of each one of them proceeds from a shared motivation: the desire to abstract.

One if the main goals of high-level programming languages generally is to neglect the underlying hardware and even the operating system.

The notion of function which most languages possess in one form or another is borrowed from mathematics and not from electronics. In a general way, languages substitute formal models for purely computational viewpoints. Thus they gain expressivity.

Abstracting errors endeavors to guarantee execution safety. A program should not fail abruptly or become inconsistent due to an error.

Programming languages make it possible to subdivide an application into different software modules that are nominally autonomous. Modularity grants high-level structuring of a complex application.

F# can trace its root back to LISP (lots of idiotic stupid parentheses).

F# is a functional language that manipulates functions as values. These can in turn be passed as arguments to other functions or returned as the result of a function call.

F# is polymorphic but different from the way C++ works.

F# interoperates with C and C++ allowing the vast library of existing code to be leveraged.

printfn "Hello World!"

In Windows though we need a bit more code:

open System

open System.Windows.Forms

let form = new form(visible = true, TopMost = true, text = "Welcome to F#")

let label =

     let temp = new label()

     let x = 3 + ( 4 * 5)

     temp.text <- sprintf "x = %d" x

     temp

form.Controls.Add(label)

[<STAThread>]

Application.Run(form)

 

© 583727 BC LTD, All Rights Reserved.