Evenementer
Mar 17, 11 PM - Mar 21, 11 PM
Maacht mat bei der Meetup-Serie, fir skaléierbar KI-Léisungen op Basis vu realistesche Benotzungsfäll mat aneren Entwéckler an Experten ze bauen.
Elo umellenDëse Browser gëtt net méi ënnerstëtzt.
Upgrat op Microsoft Edge fir vun de Virdeeler vun leschten Eegeschaften, Sécherheetsupdaten, an techneschem Support ze profitéieren.
F# 4.7 adds multiple improvements to the F# language.
F# 4.7 is available in all .NET Core distributions and Visual Studio tooling. Get started with F# to learn more.
The F# 4.7 compiler introduces the ability to set your effective language version via a property in your project file:
<PropertyGroup>
<LangVersion>preview</LangVersion>
</PropertyGroup>
You can set it to the values 4.6
, 4.7
, latest
, and preview
. The default is latest
.
If you set it to preview
, your compiler will activate all F# preview features that are implemented in your compiler.
You no longer need to apply the yield
keyword in arrays, lists, sequences, or computation expressions where the type can be inferred. In the following example, both expressions required the yield
statement for each entry prior to F# 4.7:
let s = seq { 1; 2; 3; 4; 5 }
let daysOfWeek includeWeekend =
[
"Monday"
"Tuesday"
"Wednesday"
"Thursday"
"Friday"
if includeWeekend then
"Saturday"
"Sunday"
]
If you introduce a single yield
keyword, every other item must also have yield
applied to it.
Implicit yields are not activated when used in an expression that also uses yield!
to do something like flatten a sequence. You must continue to use yield
today in these cases.
In F# code involving classes, the self-identifier needs to always be explicit in member declarations. But in cases where the self-identifier is never used, it has traditionally been convention to use a double-underscore to indicate a nameless self-identifiers. You can now use a single underscore:
type C() =
member _.M() = ()
This also applies for for
loops:
for _ in 1..10 do printfn "Hello!"
Prior to F# 4.7, the indentation requirements for primary constructor and static member arguments required excessive indentation. They now only require a single indentation scope:
type OffsideCheck(a:int,
b:int, c:int,
d:int) = class end
type C() =
static member M(a:int,
b:int, c:int,
d:int) = 1
Feedback zu .NET
.NET ass en Open-Source-Projet. Wielt e Link, fir Feedback ze ginn:
Evenementer
Mar 17, 11 PM - Mar 21, 11 PM
Maacht mat bei der Meetup-Serie, fir skaléierbar KI-Léisungen op Basis vu realistesche Benotzungsfäll mat aneren Entwéckler an Experten ze bauen.
Elo umellenTraining
Léierwee
Take your first steps with F# - Training
F# is an open-source, cross-platform programming language that makes it easy to write succinct, performant, robust, and practical code. It's a general-purpose language that enables you to create many different types of applications like Web API, Desktop, IoT, Gaming and more.
Dokumentatioun
What's new in F# 5 - F# Guide - .NET
Get an overview of the new features available in F# 5.
What's new in F# 7 - F# Guide - .NET
Find information on the new features available in F# 7.
What's new in F# 6 - F# Guide - .NET
Get an overview of the new features available in F# 6.