Questions tagged [f#-4.1]

F# 4.1 features significant language improvements and cross-platform .NET Core support.

New Features in F# 4.1

  • .NET Core and .NET Standard Support for F# 4.1

New Language Capabilities in F# 4.1

  • Struct Tuples and Interop with C# 7/VB 15 Tuples
  • Struct annotations for Records
  • Struct annotations for Single-case Discriminated Unions
  • fixed Keyword for native interop scenarios
  • Underscores in Numeric Literals
  • Caller Info Argument Attributes
  • Adding a Result Type
  • Mutually Referential Types and Modules Within the Same File
  • Implicit “Module” Suffix on modules which share the same name as a type
  • Byref Returns
  • Error Message Improvements

The following features have also shipped with F# 4.1:

  • Implement IReadonlyCollection<'T> in list<'T>
  • Optional and DefaultParameterValue attribute support
  • Additional Option module functions
  • Statically Resolved Type Parameter improvements
  • Compiler performance improvements
  • Struct annotations for multi-case Discriminated Unions

Further References

Known Issues

There are a number of known issues which are either already fixed and pending a release, or are on the immediate roadmap for getting fixed. You can see this list here.

See also

5 questions
28
votes
3 answers

Cannot resolve dependency to assembly FSharp.Core 4.4.1.0 when using VS 2017

I have been developing in VS 2015 and F# 4.0 (4.4.0.0) for quite some time. With the release of VS 2017, I want to open solutions in the newest VS for development work, but still for a while keep the projects as VS 2015, F# 4.0, .NET 4.5.2. The…
Bent Tranberg
  • 3,445
  • 26
  • 35
5
votes
1 answer

Is there an analogous to tryFind for the new Result type in F# 4.1?

The F# language contains the Discriminated Union type option<'T>. Several modules contain useful functions XYZ.tryFind whose return value is an object of type option<'T>. (Examples: List.tryFind, Map.tryFind, Array.tryFind). F# 4.1 added the type…
Soldalma
  • 4,636
  • 3
  • 25
  • 38
2
votes
0 answers

F#: Match a function by its signature

I have this question about matching functions by its signature. I am asking this for learning purposes and I do understand that there are many ways of going around this. Suppose that in F# I have the following analogous types: type T1 = int * int *…
2
votes
0 answers

Passing generic function as a parameter

I've been trying to learn F# lately and coming from object-oriented background, I have a little problems understanding generics in this one case. Let's say I have the following functions: let genericFunction<'a> (x: 'a) = () let myFunction (fn:…
Jani
  • 1,088
  • 1
  • 10
  • 18
1
vote
1 answer

How to deserialize json for correct type using f#

I'm new with F# and functional programming. I have these two types type User= { active: bool funds: int } and UserDto = { user: User } type Transaction = { amount: int time: DateTime } and TransactionDto = { …