Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to F#

Introduction to F#

Seminar talk in OOP undergraduate course.

Aggelos Biboudis

February 09, 2012
Tweet

More Decks by Aggelos Biboudis

Other Decks in Programming

Transcript

  1. 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
  2. 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
  3. 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
  4. 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. “
  5. Just show me the code for a couple of hours

    please! F# interactive action, driven by Expert F# 2.0;;
  6. 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
  7. 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
  8. 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