3.2 KiB
3.2 KiB
Features Added in F# Language Versions
F# 4.7
- Compiler support for
LangVersion
- Implicit
yield
s - No more required double underscore (wildcard identifier)
- Indentation relaxations for parameters passed to constructors and static methods
F# 4.6
- Anonymous records
ValueOption
module functions
F# 4.5
- Versioning alignment of binary, package, and language
- Support for
Span<'T>
and related types - Ability to produce
byref
returns - The
voidptr
type - The
inref<'T>
andoutref<'T>
types to represent readonly and write-onlybyref
s IsByRefLike
structsIsReadOnly
structs- Extension method support for
byref<'T>
/inref<'T>
/outref<'T>
match!
keyword in computation expressions- Relaxed upcast with
yield
in F# sequence/list/array expressions - Relaxed indentation with list and array expressions
- Enumeration cases emitted as public
F# 4.1
- Struct tuples which inter-operate with C# tuples
- Struct annotations for Records
- Struct annotations for Single-case Discriminated Unions
- Underscores in numeric literals
- Caller info argument attributes
- Result type and some basic Result functions
- Mutually referential types and modules within the same file
- Implicit
Module
syntax on modules with shared name as type - Byref returns, supporting consuming C#
ref
-returning methods - Error message improvements
- Support for
fixed
F# 4.0
printf
on unitized values- Extension property initializers
- Non-null provided types
- Primary constructors as functions
- Static parameters for provided methods
printf
interpolation- Extended
#if
grammar - Multiple interface instantiations
- Optional type args
- Params dictionaries
F# 3.1
- Named union type fields
- Extensions to array slicing
- Type inference enhancements
F# 3.0
- Type providers
- LINQ query expressions
- CLIMutable attribute
- Triple-quoted strings
- Auto-properties
- Provided units-of-measure
F# 2.0
- Active patterns
- Units of measure
- Sequence expressions
- Asynchronous programming
- Agent programming
- Extension members
- Named arguments
- Optional arguments
- Array slicing
- Quotations
- Native interoperability
- Computation expressions
F# 1.1
- Interactive environment
- Object programming
- Encapsulation Extensions
F# 1.0
- Discriminated unions
- Records
- Tuples
- Pattern matching
- Type abbreviations
- Object expressions
- Structs
- Signature files
- Imperative programming
- Modules (no functors)
- Nested modules
- .NET Interoperability