F# 4.0 Signals A Culture Change
Written by Kay Ewbank   
Monday, 03 August 2015

Microsoft has released Visual F# 4.0 as part of Visual Studio 2015. It is the first major release version of the F# language and VS tools to include community contributions.

 

According to the release notes, the new version has new language and runtime additions which fill in gaps, make more things "just work," and improve performance in key areas.

However, the release is also significant for they way it has been achieved. Writing about the release on the .NET blog, the F# team said: 

“F# 4.0 is as much about a change in culture for the language as updates to the language specification, library and tools”, adding “language design is now done in an open, collaborative way through fslang.uservoice.com. Language implementation has shifted to a fully open mode of engineering, and language delivery is shifting to be much more cross-platform and multi-editor. All of this is done by a range of contributors, including Microsoft, Microsoft Research, F# Software Foundation members and many more.”

The new language features include constructors as first-class functions. Until now there has been no way to treat a type constructor as an isolated function that could be passed around and composed with other functions. The new version treats constructors as first-class functions, with the same treatment as other traditional .NET methods.

Mutable and ref have been unified, so that the 'mutable' syntax can now be used everywhere, and captured values will be automatically converted to heap-based 'ref' values by the compiler when needed.

Support has also been added for high-dimensional arrays. The .NET framework supports up to 32-dimensional arrays, but in the past F# only supported use of up to rank-4 arrays. This is now fixed for arrays created in external libraries that rely on high-dimensional arrays.

Another improvement is support for static parameters to provided methods. In previous versions, you could supply static parameters to the top-level provided type, but all other provided types, methods, and properties had to be generated based on this single set of parameters. You can now give a single type declaration along with parameterized usage of methods.

Provided types can now be specified as non-nullable via the standard [<AllowNullLiteral(false)>], and method arguments of type Expr<'t> can now be transparently auto-quoted, passing both the argument value and the AST of the expression that generated it.

The IDE is another area to have been improved, with support for script debugging directly within the IDE. Larger and more complex code snippets are hard to debug, but until now it wasn’t possible to attach the Visual Studio debugger directly to an F# script. VS 2015 lets you debug F# scripts directly by attaching the debugger to the current F# Interactive session through context menus in the editor or the F# Interactive window itself.

Other improvements to the IDE provide the means to see whether elements of a project are up-to-date (as opposed to failed or succeeded when building the overall project). You also get intellisense support in object initializer expressions, so the completion list will contain the settable properties you can initialize. Intellisense has also been added for named parameters.  

You can see the full list of improvements in the release notes.

 

 

 

Banner


Mastering LLMs With Experts
22/10/2024

A freely available set of workshops and talks on the essentials of LLMs, taught by practitioners. The topics include Evals, Retrieval-augmented-generation (RAG), Fine-tuning etc.



Apache Lucene Improves Sparce Indexing
22/10/2024

Apache Lucene 10 has been released. The updated version adds a new IndexInput prefetch API, support for sparse indexing on doc values, and upgraded Snowball dictionaries resulting in improved tokeniza [ ... ]


More News

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Monday, 03 August 2015 )