87
F# Eye for the C# guy Leon Bambrick, secretGeek.net

F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

F# Eye for the C# guy

Leon Bambrick, secretGeek.net

Page 2: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

WTF#?

Page 3: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

F#

…it’s Fortran.net

Page 4: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

F#!@ YOU GUYS!

Page 5: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

F#An AcademicLanguage

Reserved

For

Scienticians?

Page 6: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

• General Purpose Language

• Ideal for Real World Development

None of that.

Rather:

Page 7: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Friendly. Approachable.

Page 8: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

A Multi-Paradigm Language!

a what?

Page 9: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

F#

object-oriented

procedural

functional

Page 10: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

30 second review:

3Big

Paradigms

Page 11: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

procedural

• Do this, then that, then that

• Useful abstraction over machine code

• Assembly language, Fortran, C, Pascal

Page 12: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

object oriented

• Useful abstraction over procedural

• Define types, methods, members

• Inheritance, polymorphism, overloading

• C++, VB.net, C#, J#

Page 13: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

procedural

object oriented

imperative

Page 14: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Functional = The

Other Side

Page 15: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

functional

No common ancestor with C

No matter how far back you go!

Page 16: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static
Page 17: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

functional

• Focus on results not process

• Decompose problem into ‘functions’

• Lisp, Scheme, Haskell, ML, Erlang

Page 18: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

functional?

• Visual Basic has functions...

Page 19: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

functional?

• Visual Basic has functions...

does that make it 'functional' ?

Page 20: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

functional?

FUNCTION ≠ "method that returns a value"

Page 21: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

functional?

FUNCTION ≠ "method that returns a value"

Think:

"mathematical function“

"formula"

"equation "

Page 22: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Purely functional…

Avoid

Side-

Effects!

Page 23: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Purely functional…

Avoid

Mutation!

Page 24: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Purely functional…

No Variables!

Only Functions!

Page 25: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Purely functional…

Same input ->Same output!

Page 26: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

No Shared State

Purely functional…

Page 27: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Why bother?

• Pure functions can be executed in parallel without interfering with one another

Page 28: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Why bother?

• Pure functions can be executed in parallel without interfering with one another

• Pure functions can be “perfectly” cached

Page 29: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Why bother?

• Pure functions can be executed in parallel without interfering with one another

• Pure functions can be “perfectly” cached

• Pure functions can be “partially” applied

Page 30: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Why bother?

• Pure functions can be executed in parallel without interfering with one another

• Pure functions can be “perfectly” cached

• Pure functions can be “partially” applied

• Functions can receive and return functions, for which all of the above hold true

Page 31: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Why bother?

• Pure functions can be executed in parallel without interfering with one another

• Pure functions can be “perfectly” cached

• Pure functions can be “partially” applied

• Pure functions can return functions, for which all of the above still hold true

• Allows for greater “modularity”

Page 32: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

What’s the catch?

• “Hello world” is a side effect

• Custom runtimes a-plenty

Page 33: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

What’s the catch?

• “Hello world” is a side effect

• Custom runtimes a-plenty

• Smug Lisp weenies

Page 34: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Some stuff is now cheap!–Ram

–Disk

–Cores

Some stuff remains expensive!– Time

–Concurrency

– Locking

Functional is the new OO

Page 35: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Some stuff is now cheap!–Ram

–Disk

–Cores

Some stuff remains expensive!– Time

–Concurrency

– Locking

Functional is the new OO

Page 36: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Some stuff is now cheap!–Ram

–Disk

–Cores

Some stuff remains expensive!– Time

–Concurrency

– Locking

Functional is the new OO

Page 37: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Some stuff is now cheap!–Ram

–Disk

–Cores

Some stuff remains expensive!–Real Time

–Concurrency

– Locking

Functional is the new OO

Page 38: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

This tips the balance toward higher abstractions

Page 39: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Genealogy of F# …

• Theorem proving and ISWIM

Page 40: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Genealogy of F# …

• Theorem proving and ISWIM begat:

–ML “Meta Language”

Page 41: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Genealogy of F# …

• Theorem proving and ISWIM begat:

–ML “Meta Language”, which begat:

• CAML

Page 42: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Genealogy of F# …

• Theorem proving and ISWIM begat:

–ML “Meta Language”, which begat:

• CAML, which in turn begat

–OCaml

Oh!

Page 43: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Genealogy of F# …

• Theorem proving and ISWIM begat:

–ML “Meta Language”, which begat:

• CAML, which in turn begat

–OCaml, which in turn begat

»F#... a sort of OCaml.net (and more)

Page 44: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

WTF#?

• First official functional language on .net

• Deep support thanks to Generics

Page 45: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

WTF#?

• First official functional language on .net

• Deep support thanks to Generics

• Recently assimilated by dev-div

Page 46: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Code!

//F#

let a = 2

Page 47: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Code!

//F#

let a = 2

//C#

int a = 2≠

Page 48: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Code!

//F#

let a = 2

//C#

//a function!

static int a()

{

return 2;

}

More like

Page 49: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

More Code!

//F##light

open System

let a = 2

Console.WriteLine a

//C#using System;

namespace ConsoleApplication1{

class Program{

static int a(){

return 2;}

static void Main(string[] args){

Console.WriteLine(a); }

}}

Page 50: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

More Code!

//F##light

open System

let a = 2

Console.WriteLine a

static a

2

Console.WriteLine aMore Noise Than Signal!

Page 51: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

More Code!

//F##light

open System

let a = 2

Console.WriteLine a

//C#using System;

namespace ConsoleApplication1{

class Program{

static int a(){

return 2;}

static void Main(string[] args){

Console.WriteLine(a); }

}}

Looks Weakly typed?Maybe Dynamic?

Page 52: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Strong? Dynamic?

Static? Weak?

F#?

Page 53: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Strong Dynamic

Static Weak

F#

Page 54: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Strong Dynamic

Static Weak

F# Yet Expressive

Page 55: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Strong Dynamic

Static Weak

F#

Yet Versatile

Page 56: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

More Code!

//F##light

open System

let a = 2

Console.WriteLine a

//C#using System;

namespace ConsoleApplication1{

class Program{

static int a(){

return 2;}

static void Main(string[] args){

Console.WriteLine(a); }

}}

Type Inference

Page 57: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

let a = 2

let a = 3

error: FS0037: Duplicate definition of value 'a'

Immutable by default

Page 58: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

let square x = x * x

> val square : int -> int

square 5

> val it : int = 25

simple function…

Page 59: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

let square x = x * x

> val square : int -> int

square 5

> val it : int = 25

simple function…

Parameter

Page 60: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

let square x = x * x

> val square : int -> int

square 5

> val it : int = 25

simple function…

“Signature”

Page 61: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Discriminated union typestype NullableInt =

| Value of int

| Nothing of unit

Page 62: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Discriminated unions example

type Weapon =

| Knife

| Gun

| Bomb

Page 63: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Pattern Matching

type Weapon =

| Knife

| Gun

| Bomb

//block any weapon!let block w =

match w with| Knife | Gun -> disarm w| _ -> difuse w

block Gunblock Knifeblock Bomb

Page 64: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Pattern Matching

type Weapon =

| Knife

| Gun

| Bomb

//block any weaponlet block w =

match w with| Knife | Gun -> disarm w| _ -> difuse w

block Gunblock Knifeblock Bomb

Page 65: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Lazy is a virtuelet lazy_square x =

lazy ( print_endline “thinking...“

x * x )

let lazy_square_ten = lazy_square 10

//first time: “thinking…”

Lazy.force (lazy_square_ten)

//second time: no thinking, just result

Lazy.force (lazy_square_ten)

Page 66: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Useful libraries

Neat manual

AwesomeSamples

Page 67: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static
Page 68: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static
Page 69: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

“Empty” source file…

5 pages of help!

Page 70: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Make sure F# Interactive is running!

Page 71: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

F# Interactive:

It’s the bomb!

Page 72: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

F# Interactive:

Page 73: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static
Page 74: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Why learn F#?

Page 75: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

• See where C# and VB.net are headed

Why learn F#?

Page 76: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

• See where C# and VB.net are headed

• Learn one new language per year

Why learn F#?

Page 77: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Moore’s Law Ran Out!

Why learn F#?

Page 78: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Moore’s Law Ran Out!(again, maybe)

Why learn F#?

Page 79: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

• Data Grows Quickly

• But # of Dimensions Grows much faster!

• And semi-structured data outgrowing structured

• Entropy Increasing

• Complexity is through the roof!

Page 80: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Hence: Again with the donkey

Page 81: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

“Software gets slower faster than hardwaregets faster”

--Wirth’s Law

Page 82: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Lisp F# is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp F#itself a lot."

- Eric Raymond (lb)

Page 83: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Some Applications of F#

• Map/Reduce over internets

• Financial Analysis

• In process SQL Data Mining

• XNA Games Development

• Web tools, Compile F# to Javascript

Page 84: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Game Programming

Page 85: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Game Programming

• 3D Animation

• Rendering

• Shading

• Simulation (e.g. physics)

• Collision Detection

• AI Opponents

Page 86: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

8 Ways to Learn

• FSI.exe

• Samples Included

• Go to definition– See the source!

• Lutz’ Reflector

• http://cs.hubfs.net

• Codeplex FsharpSamples

• Books

• ML

Page 87: F# Eye for the C# guy•Custom runtimes a-plenty. What’s the catch? •“Hello world” is a side effect ... Strong Dynamic Static Weak F# Yet Expressive. Strong Dynamic Static

Acknowledgements

• Cartman

• Einstein

• Dilbert

• Alan Turing

• Alonzo Church

• Godzilla

• Gears of war

• John Hughes, Why Functional Programming Matters,http://www.math.chalmers.se/~rjmh/Papers/whyfp.html

• Robert Pickering, Foundations of F#, http://www.apress.com/book/view/1590597575

• Slava Akhmechet, Functional Programming For The Rest of Us, http://www.defmacro.org/ramblings/fp.html

• Steve Yegge, Execution In the Kingdom of Nouns, http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html

• P. J. Landin, The Next 700 Programming Languageshttp://www.cs.utah.edu/~wilson/compilers/old/papers/p157-landin.pdf

• Tim Sweeney, The Next Mainstream Programming Language, http://www.st.cs.uni-sb.de/edu/seminare/2005/advanced-fp/docs/sweeny.pdf

• Tomas Petricek, F# Web Tools, Ajax Made Simple, http://www.codeplex.com/fswebtools

• Herb Sutter, The Free Lunch Is Over - A Fundamental Turn Toward Concurrency in Software, http://www.gotw.ca/publications/concurrency-ddj.htm

• Don Syme, http://blogs.msdn.com/dsyme