2. Thoughtworks Tech Radar 2012
F# Languages
“F# is excellent at concisely
expressing business and
domain logic.”
3. UML Sequence Diagrams
let fred = Object("FredrnPatron")
let bob = Object("BobrnWaiter")
let hank = Object("HankrnCook")
let renee = Object("ReneernCashier")
4. Types
F# UML Class Diagram
type Object(name) =
member this.Name = name
type Action =
| Call of Object * string *Object
| Async of Object * string *Object
6. DSLs for Testing
Internal DSL (NaturalSpec) External DSL (Gherkin)
• [<Scenario>] • Given I input 5
• let ``When calculating factorial of • When calculating the factorial
5 it should equal 120``() = • Then the result is 120
• Given 5
• |> When calculating factorial
• |> It should equal 120
• |> Verify
7. Learn More
• FParsec: http://www.quanttec.com/fparsec/
• FSLex /FsYacc:
http://fsharppowerpack.codeplex.com/
Notas do Editor
Lightweight types with correct defaultsImmutabilityCompositionSeparation of concernsLightweight functions with correct defaultsIdempotentTestableType signatures