After the 'F# Compiler Community Session' I read the first 1K lines of SyntaxTree.fs
. That's what I learned about the language.
-
There is a byte string
let a = "abc"B val a : byte [] = [|97uy; 98uy; 99uy|]
-
You can specify the expected type behind any expression
let add a b = (a + b) : int val add : a:int -> b:int -> int
-
Discriminated Union augmentations can be disabled
[<DefaultAugmentation(false)>] type Animal = | Snake | Dog | Cat (* fails when default augmentations are enabled (default) *) member this.IsDog = match this with | Dog -> true | _ -> false
-
There is a strange but supported property setting syntax (but please don't use it)
let arr = ResizeArray([|1; 2; 3|]) arr.Item(0) <- 42
Yes please don't use 3 or 4
3 has bugs in conjunction with other features
4 is actually a dotnet and vb thing