News

Open Source Community Powers New F# 4.5 Preview

Perhaps nothing better exemplifies the "new" Microsoft than the process of developing the F# functional programming language it created 13 years ago, a process heavily dependent upon the open source community.

Microsoft noted that open source dependence in announcing a preview of F# 4.5 last week.

"F# 4.5 has been developed entirely via an open RFC (requests for comments) process, with significant contributions from the community, especially in feature discussions and demonstrating use cases," said the company's F# guru, Phillip Carter.

Carter and his team at Microsoft are the primary developers of the language, though it's officially under the direction of the F# Software Foundation, which maintains various F# code repositories on GitHub.

There, those aforementioned RFCs can be examined, resulting from a process in which developers interested in furthering the language go to F# Language Suggestions to submit ideas, which are then discussed and voted on.

"Ideas which get 'approved in principle' get an RFC entry based on the template, and a corresponding RFC discussion thread," says the GitHub F# Language Design RFCs site.

Carter invited developers to check out the RFCs that helped shape F# 4.5, corresponding to F# 4.5 RFCs and FSharp.Core 4.5.0 RFCs, the latter related to Microsoft's new .NET Core/.NET Standard initiatives that make .NET Framework more modular, portable and cross-platform.

On those repositories are several RFCs ranging from "there should be a syntatic sugar, called match!, that is equivalent to let! followed by match" to "allow effective consumption of APIs using Span, Memory and ref-returns."

The latter RFC adds F# support for the new Span feature in .NET. That alignment with the new Span feature in .NET Core 2.1 was described by Carter as "the largest piece of F# 4.5."

Carter also goes on to discuss the new match! keyword that he says somewhat shortens a lot of common boilerplate code.

That such community suggestions make it into the final F# language design isn't an accident, as Microsoft early on emphasized the open source community approach to developing the language.

For example, in "The .NET Language Strategy" published last year, the F# section includes this:

We will enable and encourage strong community participation in F# by continuing to build the necessary infrastructure and tooling to complement community contributions. We will make F# the best-tooled functional language on the market, by improving the language and tooling experience, removing road blocks for contributions, and addressing pain points to narrow the experience gap with C# and VB. As new language features appear in C#, we will ensure that they also interoperate well with F#. F# will continue to target platforms that are important to its community.

This focus on community contributions appears to be paying off, as the July 2018 TIOBE Index, which measures programming language popularity, noted that "F# leaped 19 places to position 36."

Besides the major Span functionality mentioned above, Carter explains many other new features in the F# 4.5 preview, including "F# enumeration cases emitted as public," "better async stack traces," "safety rules for byrefs" and more.

These features build on a host of other functionality introduced in May with Visual Studio 2017 15.7, which featured improvements to the F# compiler and core library, tooling, and infrastructure, bringing the language more up to par with C#.

That improvement train continues in the new preview release. And even though it's dubbed a preview, the release is basically what you'll get in F# 4.5.

"This preview is very, very stable," Carter said. "In fact, after extensive testing, we feel that it's stable enough for us to consider it a proper release, but due to the timing of the .NET SDK and Visual Studio releases, we're releasing it now as a preview. Soon, when Visual Studio 2017 update 15.8 and the corresponding .NET Core 2.1 SDK update release, we will declare F# 4.5 as fully released and it will be fully included in both places."

Meanwhile, developers interested in seeing in what directions the community will be driving the language going forward can check out the F# Suggestions site on GitHub.

However, note that there is currently a backlog of approved ideas, and the top five suggestions that boast the most "thumbs up" reactions all stem from 2016.

As far as a roadmap for the language going forward, Microsoft says the closest approximation is the list of approved-in-principle items.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events