Menu

Supported FSharp Language Features

Features (1)
James Hardaker

Below is a complete list of tested functionality (at the time of writing).
If you spot a bug in the list below please raise a ticket.

Operators

  • + - * /
  • = <> <= >= > <
  • && ||
  • ** %
  • ()
  • |> ||> |||> <| <|| <|||

Expressions

  • ForTo (int)
  • While
  • Match (basic Discriminate Unions tested, may be bugs here)
  • Closures
  • First class functions (and nested let)
  • Lambdas
  • Implied generic let binding
  • Shadowing (can cause crashes)

Class (several bugs in this area)

  • Methods
  • Generic Methods
  • Get Property
  • Set Property
  • Auto Property
  • Fields
  • Implicit constructor and initialization
  • Some explicit constructors working, cannot overload

Struct

  • Fields
  • Explicit constructors

Records

  • Can be defined, not sure about explicit members

Types

  • int
  • float
  • string
  • bool
  • array

Arrays

  • Declaration
  • SetValue (.[index])
  • GetValue (.[index])

Modules

  • Let bindings (within the cpp module)

Managed / Unmanaged interop

  • Pass only user defined types
  • Pass reference
  • Pass struct by value
  • Pass struct by ref
  • Pass string,int,float,bool
    (see examples and MarshalAs)

.Net Framework class library

  • System.Console.WriteLine(string)
  • F# explicit conversion ToDouble(int) / ToInt(double)

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.