C9 Lectures: Dr. Don Syme - Introduction to F#

C9 Lectures: Dr. Don Syme - Introduction to F#, 2 of 3

Download this episode

Download Video

Description

F# is Microsoft's first functional programming language to be included as one of Visual Studio's official set of languages. F# is a succinct, efficient, expressive functional/object-oriented programming language under joint development by Microsoft Developer Division and Microsoft Research. During the course of Erik Meijer's fantastic lecture series on functional programming fundamentals several of you asked for examples of specific topics in F#.

In part 2 of this 3 part lecture series (see part 1 here), Dr. Syme provides an overview of the following topics:

Functional Data
Pattern Matching
Imperative Basics
Sequences

NOTE: Announcing the F# February 2010 Release!

The F# Team says: We’re excited to announce that we have made available a new release of F# along with the Visual Studio 2010 RC and a matching February 2010 F# CTP for VS2008. 

In addition, we’ve launched the
F# PowerPack as a CodePlex project, enabling this set of valuable F# extensions to continue to grow and improve separately
from the stable core F# releases.

Part 1
Part 3

Get the slides for this lecture series here.

Read Don's Blog

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • frou

      Don and C9, thanks for these. The videos are a very approachable way to learn.

    • Charles

      You're welcome. More to come.
      C

    • Clem

      Great tutorial.

      Why is let triangle () = .... and not let triangle = ...

      The way I understood is the triangle is a value, but the () makes think it's a function.

       

    • jlomax

      Very nice.  Thank you.

       

      I'd much prefer to see a correct model of Blackjack though.  Aces are worth either 1 or 11, and seeing such a flaw in an example is hard to take.   Hopefully, you'll show us how to actually do it in the next part!

       

      Thanks!

       

       

    • keithfl

      Cmon ... this tutorial is excellent!! ...nothing here is 'hard to take'!!

       

      He shows you (and explains!) every line of code ... if you wish to make this example 'more correct' just spend a few minutes .. adjust the example as you see fit and post about your experience! ...

       

      Don Syme ... thanks for doing this!!

       

       

    • keithfl

      Has anybody purchased the Chris Smith book?  (Programming F#: A comprehensive Guide -- isbn: 0596153643)

      The are only a few reviews on Amazon (all positive) but I'd appreciate more comments and maybe a little bit more critical perspective before I buy.

       

       

    • Jarle Stabell

      I haven't read the whole of Chris Smith's book yet, but so far I can recommend it, it is well written, nicely formatted and generally easy to read. I have two other great F# books as well, but my impression is that Chris Smith's book is the best introduction to F# I've seen yet.

       

      Don & C9, thanks for another great video!

      BTW: I simply cannot resist the temptation to point out that one of the code examples can be simplified, in the allFiles function, the following is used:

      for file in Directory.GetFiles dir do
        yield file

       

      which is equivalent to:

      yield! Directory.GetFiles dir

       

       

    • nyinyithann

      I bought Chris Smith's Programming F#. It's excellent book.  Concise explanation.

    • nyinyithann

      Thanks  Charles and Dom.

      It's really useful for someone like me who is learning F#.

      I do hope that more and more F# shows are coming in future.

      And i really would like to watch the discussion about FP between Erik and Dom. 

      Charles... Can u arrange? Smiley

    • exoteric

      There's also a most excellent interview with Don on Infoq. Here Don touches on the background for the design of F# and how to make it fit with .Net. It's quite enlightening and I certainly learned a lot from it.

       

      http://www.infoq.com/interviews/F-Sharp-Don-Syme

    • Charles

      Yes. I've been wanting to shoot a Don/Erik E2E for a long time.. Hopefully, we can do this in April..

      C

    • Ryan Riley

      I agree, an in depth discussion between Erik and Don would be fun. I wouldn't mind seeing them point out the major differences between F# and Haskell, as well as how to write Haskell-esque F#. I would think we would see a lot of material similar to Matt Podwysocki's articles on monads. Smiley

       

      By the way, if you are interested in more videos, community, etc. around F#, please join Community for F# (http://c4fsharp.groups.live.com). We have Live Meetings every third Tuesday of each month at 12:00 pm EST. Details can be found on the Live Group (you'll have to join to see it though as Live Groups doesn't allow anything to be just public :-/). Hopefully Don will join us soon! Tomorrow we have Steffen Forkmann talking about Fake (F# make), Natural Spec, and Functional NHibernate.

    • rgruian

      Excellent. I am looking forward to seeing part 3.

    • MrADubbATL

      Using snippets would make things a lot easier. Won't have to copy and paste code from the slides.

    • calinus

      Hi,

       

       First of all, excellent presentations.

       

       A couple of questions that I will submit more to come after I finish watching:

       - why not have all the collection as seq ?

       - is there a unit testing framework available for F# ?, since it's a .net language I guess I can use stuff like nunit or xunit. 

       

      Thank you,

    • brianmcn

      The "seq" type is just an alias for "IEnumerable", and all the F# collection types implement the IEnumerable interface, so you can treat e.g. a list of integers as a seq of integers.

       

      Yes, you can use things like NUnit (we actually use this on the F# team for some of our unit testing).  There are also some unit testing tools developer in F#, like FsCheck.  You might check out http://stackoverflow.com/questions/1989487/f-development-and-unit-testing to learn more.

    • ailatzis

      hey Charles can you arrange something with Eric and Don going deep or something like that, to talk about the shift in the fp mindset for imperative programmers (for us which our first language was pascal and second ansi c and end to c# or vb it is quite a step immutability etc) or if this isn't feasible just invite Don to talk about his new book about f# which is coming soon
      thank you
      Alex

    • Charles

      Next time Don's in town I will arrange an Erik/Don conversation. C

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.