Today I’m going to share information about F# in Visual Studio 2015.
When Visual Studio 2015 was first released, F# was also released as F# 4.0. Put it simply, Visual Studio 2015 has F# 4.0 in it, or you can view it other way: F# 4.0 was released at the same time as Visual Studio 2015 released.
A complete list of F# 4.0 new features, enhancements and bug fixes are available in F# Github repository in the form of markdown page: https://github.com/Microsoft/visualfsharp/blob/fsharp4/CHANGELOG.md
There many nice features and bug fixes! But for me, based on the previous link, the nice parts of new features of F# 4.0 are:
- Constructors can be treated as first class functions
- Support for high dimensional arrays is now in sync with .NET 32 dimensions array. Previously F# only supported up to 4 dimensional arrays.
- Synchronize of “API parity” for List, Array, and Sequence, including additional new APIs: chunkBySize, contains, except, findBack, findInstanceBack, indexed, item, mapFold, mapFoldBack, sortByDescending, sortDescending, splitInto, tryFindBack, tryFindIndexBack, tryHead, tryItem, tryLast
- Slicing support for List
- Supports for VS debugger for debugging F# script
- Slicing support for List is quite comfortable, but please be careful that this List is F# List, not the original .NET’s System.Collections.Generic.List. F# List is implemented as linked-list, this is why the original F# List has no inherent support for index before F# 4.0. Actually and it’s natural to have an index, because slicing support requires to have an index.
- High dimensional arrays are not available in all of the F# APIs. There’s no API for manipulating arrays that has dimensions above 4 dimensions.
Tomorrow I’ll discuss the new features above with some samples!