Skip to main content

A, B , C & now F# programming language

F# is derived from the ML family of languages, part of the functional programming language tradition. However, F# is not simply a functional language: it is a multi-paradigm langauge that attempts to capture the best of both functional and object-oriented programming in the context of .NET. Furthermore, even when used as a purely functional language F# is remarkable for the sheer power of the libraries and tools available through .NET.

The distinctive features of all ML-family languages are strong static type checking, excellent type inference, lightweight and typesafe function types, safe and syntactically convenient discriminated unions. These core work together to allow for succinct yet efficient solutions to many programming problems, and repeatedly permit common patterns of coding to be abstracted very easily.

One way of looking at it is that the purpose of F# is to solve all of the 7 major problems described in Wadler's classic paper Why no one uses functional languages: Libraries, Portability, Availability, Packagability, Tools, Training and Popularity. Of these, F# solves the issues of libraries (by immediately giving high-quality, no-wrapper access to hundreds of .NET libraries), portability (the .NET bytecode is portable, e.g. the Mono project provides an implementation for many platforms), packagability (.NET assemblies are an excellent packaging mechanism) and tools (.NET tools for other languages nearly always work with F# as well). The remaining issues are partly solved by the fact that F# has a core design similar to that of OCaml, a popular functional language implementation for which a good amount of training material is available, and also that huge amounts of excellent training material for the .NET platform is available on the web.

In more detail, the aims of F# are as follows:

  • To implement the core features of an ML programming language on the .NET platform, focusing on language interoperability via typed compilation, and to provide the an ML implementation that can co-exist as a partner language in a multi-language setting ;

  • To bring the benefits of .NET and ML-style programming to the scientific, engineering and high-performance computing communities. This also provides a setting where we can write truly significant applications in an ML-like language, thereby enabling the research community to identify and solve the remaining issues that inhibit the uptake of modern languages in the context of these software ecosystems.


There are several key application areas for a language like F# on the .NET platform. In particular, such languages excel at mathematically-oriented programming, and, given the right libraries and visualization tools, a range of scientific and engineering tasks as well. These languages are also well known to be extremely powerful when used to implement sophisticated symbolic analyses such as hardware verification, software verification, optimization, machine learning and compilation.

You can read about many applications of F# on Don Syme's blog.

The minimal technical requirements for a powerful scientific and data-intensive .NET programming language are as follows:

  • High performance

  • Succinctness

  • Simplicity

  • Interactive scripting and visualization

  • A rich developer experience (intellisense, codesense, debug, tools)

  • Support for .NET component development

  • Easy, efficient access to .NET libraries

  • Alignment with key for emerging technical trends such as multi-core computing, web services and data-oriented meta-programming.

Here are some of the things that make F# highly distinctive in this arena:

  • Its inherent technical strengths as a multi-paradigm programming language, and in particular the added productivity benefits of functional programming.

  • The use of type inference and automatic generalization to achieve both succinctness and performance.

  • The F# toolset for interactive visualization and development

  • Its support for LINQ and LINQ-style meta-programming.

  • The support of Microsoft Research for a credible, stable reputation and as a focal point for the F# community and as a key source of high-impact users at Microsoft.

  • The inherent importance of functional programming in the emerging multi-core world.

F# is, technically speaking, neutral with respect to concurrency - it allows the programmer to exploit the many different techniques for concurrency and distribution supported by the .NET platform. However, functional programming is one of the primary known techniques for minimizing, tracking and isolating the use of mutable state, essential for emerging techniques such as software-transactional-memory.

F# can directly use multi-core programming libraries such as ParallelFX. F# also includes language and library support for asynchronous workflows, a technique to write reactive programs and asynchronous message passing agents in a natural and compositional style.

One of the striking features of F# is its combination of dynamic and static features. For example, F# Interactive provides a strikingly powerful dynamic compilation environment, where dynamically entered code is executed using the full performance power of high-quality native code.

Another key feature of dynamic languages is succinctness. As with previous versions of ML, F# manages to be as succinct as many dynamic languages through its use of type inference, but like-for-like computationally-intensive samples will typically execute faster than other dynamic language implementations.

F# permits the use of other dynamic techniques such as a universal 'object' type, runtime code generation, runtime inspection of the properties of values and the runtime analysis of type parameters.

F# doesn't share all the features of dynamic languages. For example, it is not yet easily hosted inside other applications. At a language level, some operations characteristic of dynamic languages are not permitted. Likewise, it doesn't directly target the Dynamic Language Runtime, though may do so in the future.


"ML" is a language design that has had several manifestations, from Edinburgh ML to Standard ML and through to the current SML '97 and OCaml languages. F# follows the tradition of the Caml design group who seek a balance between stability and innovation. Both F# and OCaml use a simple, elegant core language and add interesting extra features. For the past several years, Ocaml has been a de-facto standard in the applied ML programming. As such, F# takes the design of core OCaml as a starting point, but combines the enormous strengths of the core OCaml language with those of .NET.


LINKS

  1. http://caml.inria.fr/ - The CAML Language
  2. http://research.microsoft.com/fsharp/fsharp.aspx




Comments

Popular posts from this blog

SCRUM- Who should write a user story

Traditionally user stories (or requirements) were written by Business analysts. They used to prepare big documents after months of study. It was a herculean task. I used to get such UI/Functional specification documents. I have fixed a lot of bugs because I missed few text in such 1000 + pages document. This is not the only interesting part. Some of the requirements were so weird that I often wondered why I am creating the features which no one is going to use. If I had the option I would have recommended a better option. If the BA’s misunderstood some requirements & customers failed to correct those few words in the epic requirement then we will have a nice situation.
In the agile world the story is different. Product Owners are primarily responsible for user stories. But can anyone else also contribute? Yes. Definitely yes In actual environment many users write user stories. The first requirement may come from end user. The PO, tech architect, scrum master, BA’s... anyone can upd…

What are the rules of scrum?

A relatively new person to scrum asked me this question last day. My answer to that person was yes. But really does the scrum have any rules? Scrum is a framework which helps us in developing software. It has very few rules and apart from those basic rules rest of them are guidelines like best practices.

Some of the rules 

The roles of Scrum
•Scrum Master - http://www.theagileschool.com/2012/03/scrummasters-checklist-roles.html
•Product Owner
•Feature TeamThe PDCA cycle (http://www.theagileschool.com/2012/05/pdca-scrum-or-agile-why-is-it-important.html )  frequent communication about risks (daily)
•Plan – Sprint planning
•Do – Actual engineering sprint – deliver a potential shippable code
•Check – Sprint review
•Act – Retrospective 
The scrum guide @ http://www.scrum.org/Scrum-Guides will be a good guideline for teams/companies planning to start scrum. If you are following the recommendation in these then you are following scrum.
Apart from these rest of the ceremonies and artifacts are there…

PDCA & SCRUM (or Agile); Why is it important?

The PDCA (Plan DO Check Act) cycle was made popular by Dr. W. Edwards Deming. This is a scientific cyclic process which can be used to improve the process (or product). This is cyclic in nature and usually time boxed.

Plan 
This is the first stage of the process. During this step the team discusses the objectives, the process and the clear conditions of exit (conditions of acceptance). This stage sets the measurable and achievable goals for the team.

DO
Team works together to achieve the objective set in the planning phase. Team works with the set of agreed process.

Check
Once the implantation is done team regroups and verifies the output and compares it to the agreed conditions of acceptance decided during the planning phase. The deviation, if any, is noted down.

ACT
If any deviation in planned tasks is observed during the Check stage, a root cause analysis is conducted. Team brainstorms and identifies the changes required to prevent such deviations in future. Team also brainstorms idea…