"Why use F#?" in one page
https://swlaschin.gitbooks.io/fsharpforfunandprofit/content/why-use-fsharp/
简洁性 Conciseness
// one-liners
[1..100] |> List.sum |> printfn "sum=%d"
// no curly braces, semicolons or parentheses
let square x = x * x
let sq = square 42
// simple types in one line
type Person = {First:string; Last:string}
// complex types in a few lines
type Employee =
| Worker of Person
| Manager of Employee list
// type inference
let jdoe = {First="John";Last="Doe"}
let worker = Worker jdoe方便性 Convenience
正确性 Correctness
并发性 Concurrency
完整性 Completeness
# The "Why Use F#?" series
Last updated