dotnet miami - april 19, 2012: horacio nunez: introduction to f#
DESCRIPTION
dotNet Miami - April 19, 2012: Presented by Horacio Nunez: In this talk we are going to learn the basics of programming with F# from Visual Studio 2010. After talking a bit about the genesis of F# we will go through some examples illustrating the functional ways of F# and how it aligns with the other citizens of the managed world. Among the F# features we will visit are High Order Functions, Pattern Matching and the Asynchronous workflows.TRANSCRIPT
![Page 2: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/2.jpg)
What is F#?
F# Interactive
F# 101 (less than 10 minutes!)
Walkthrough: Functional
Numerical Matrixes
Online Resources
![Page 3: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/3.jpg)
F# is multi-paradigm
programming language targeting
the .NET framework
![Page 4: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/4.jpg)
functional
object oriented
imperative
language oriented
F#
![Page 5: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/5.jpg)
Immutable values and data types
(No State => No Shared Memory)
let x = 10x = 10 //<!-- boolean
![Page 6: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/6.jpg)
High Order Functions
(functions can be parameters and
results of other functions)
![Page 7: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/7.jpg)
Type Inference
Think in C#’s var… everywhere
![Page 8: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/8.jpg)
Declarative
Express the desired result, not the
step-by-step recipe
![Page 9: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/9.jpg)
Lazy Evaluation
Use values only when you really
need it
![Page 10: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/10.jpg)
Pattern Matching
The compiler “understands” types
![Page 11: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/11.jpg)
Imperative
![Page 12: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/12.jpg)
Mutable values and data types
(State => Probable Shared Memory)
let mutable x = 10x <- 10
![Page 13: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/13.jpg)
Object Oriented
![Page 14: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/14.jpg)
F# can consume and create OOP
designs seamlessly
![Page 15: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/15.jpg)
also…
F# becomes MSIL, hard
to read, but MSIL
![Page 16: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/16.jpg)
F# is fully supported in Visual
Studio except for GUI Designers
![Page 17: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/17.jpg)
What is F#?
F# Interactive
F# 101 (less than 10 minutes!)
Walkthrough: Functional
Numerical Matrixs
Online Resources
![Page 18: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/18.jpg)
What is F#?
F# Interactive
F# 101 (less than 10 minutes!)
Walkthrough: Functional
Numerical Matrixs
Online Resources
![Page 19: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/19.jpg)
What is F#?
F# Interactive
F# 101 (less than 10 minutes!)
Walkthrough: Functional
Numerical Matrixs
Online Resources
![Page 20: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/20.jpg)
Functional Abstractions for
Numerical Matrixes
![Page 21: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/21.jpg)
Have you ever tried to create a
Matrix of order Int32.MaxValue?
![Page 22: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/22.jpg)
Out of Memory Exception!
![Page 23: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/23.jpg)
What is F#?
F# Interactive
F# 101 (less than 10 minutes!)
Walkthrough: Functional
Numerical Matrixs
Online Resources
![Page 24: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/24.jpg)
ONLINE RESOURCES
Don Syme’ Blog (F# Designer)
http://blogs.msdn.com/b/dsyme/
Tomas Petricek's’ Blog
http://tomasp.net/
![Page 25: dotNet Miami - April 19, 2012: Horacio Nunez: Introduction to F#](https://reader035.vdocuments.mx/reader035/viewer/2022081404/5598f55f1a28ab64278b45cb/html5/thumbnails/25.jpg)
ONLINE RESOURCES
F# Snippets
http://fssnip.net/
Channel 9
http://channel9.msdn.com/
StackOverflow
http://stackoverflow.com/