Slide 1

Slide 1 text

Introduction to F# 9/2/2012 Aggelos Biboudis, Doctoral Researcher University of Athens www.di.uoa.gr/~biboudis

Slide 2

Slide 2 text

Functional Programming in a slide (not; but a quick enough) FP emphasizes application of functions Epic Functions are Epic!!!!! (as in math!)  Avoid State and Mutation  Call the function twice and get the same answer  First class in FP Imperative, changes in state Foundations on lambda calculus (Alonzo Church in the 1930)  Function definition  Function application  Recursion

Slide 3

Slide 3 text

Functional, Imperative, OOP C -> Imperative C++ -> OOP first, preserving the imperative character, recently multiparadigm C#-> OOP, multiparadigm, functional elements Declarative programming, expresses what the program should accomplish without prescribing how to do it

Slide 4

Slide 4 text

() Fortran 1957, John Backus Lisp 1958, John McCarthy

Slide 5

Slide 5 text

Some history (1970) ML by Robin Milner from University of Edinburgh ML->StandarML->Caml->OCaml unifing functional, OOP and imperative (2005) F# by Don Syme from Microsoft Research F# is essentially a .NET adaptation of OCaml bringing the power of FP to .NET

Slide 6

Slide 6 text

F# is... ... a programming language.

Slide 7

Slide 7 text

F# is... ...a functional programming language

Slide 8

Slide 8 text

F# is... ... a functional programming language for .NET.

Slide 9

Slide 9 text

F# is... ...a functional and object oriented programming language for .NET

Slide 10

Slide 10 text

F# is... ...a functional, object oriented and imperative programming language for .NET

Slide 11

Slide 11 text

F# is... ...a functional, object oriented, imperative and explorative programming language for .NET

Slide 12

Slide 12 text

F# is... ...a multi-paradigm programming language for .NET

Slide 13

Slide 13 text

An open source compiler “This source code is under the Apache 2.0 license and is published as part of the F# PowerPack codeplex project, which is now also under the Apache 2.0 license. The F# PowerPack now includes libraries, tools and the compiler/library source code drops. “

Slide 14

Slide 14 text

IDEs Visual Studio Mono-develop

Slide 15

Slide 15 text

Just show me the code for a couple of hours please! F# interactive action, driven by Expert F# 2.0;;

Slide 16

Slide 16 text

Books Expert F# 2.0 Real-World Functional Programming Beginning F# Programming F# F# For Scientists Visual F# 2010 for Technical Computing Professional F# 2.0

Slide 17

Slide 17 text

Books Expert F# 2.0 Real-World Functional Programming Beginning F# Programming F# F# For Scientists Visual F# 2010 for Technical Computing Professional F# 2.0

Slide 18

Slide 18 text

Links On the Web  http://fsharp.net/  http://research.microsoft.com/fsharp  http://www.tryfsharp.org/  Don Syme - http://blogs.msdn.com/dsyme  Luke Hoban - http://blogs.msdn.com/lukeh  Design Guidelines Community  http://cs.hubfs.net F# Samples  http://code.msdn.microsoft.com/fsharpsample

Slide 19

Slide 19 text

Keep Hacking :-)