Syntax Matters: Writing abstract computations in F#
- ๐ค Speaker: Tomas Petricek (University of Cambridge)
- ๐ Date & Time: Friday 01 June 2012, 15:15 - 16:15
- ๐ Venue: SS03, Computer Laboratory
Abstract
The academic literature describes a number of abstract computation types such as monads, applicative functors and their compositions. These can be used to describe features of mainstream languages such as generators in Python or asynchronous computations in C# 5, but working with abstract computations without a convenient syntactic sugar is difficult.
In this paper, we describe computation expressions, which is a syntactic sugar for working with abstract computations in F# 2.0. Unlike the do notation in Haskell, computation expressions are not tied to a single kind of abstract computations. They support wider range of computations, depending on what operations are available and they also provide greater syntactic flexibility.
As a result, F# programmers are able to use a single syntactic sugar for a wider range of computations including monoidal sequence generators, monadic parsers and applicative formlets. This removes the need for ad-hoc language extensions that provide โnice syntaxโ for one particular kind of computations.
This is a practice talk for TFP ’12. Joint work with Don Syme.
Series This talk is part of the Computer Laboratory Programming Research Group Seminar series.
Included in Lists
- All Talks (aka the CURE list)
- bld31
- Cambridge talks
- Computer Laboratory Programming Research Group Seminar
- Department of Computer Science and Technology talks and seminars
- Interested Talks
- School of Technology
- SS03, Computer Laboratory
- Trust & Technology Initiative - interesting events
- yk449
Note: Ex-directory lists are not shown.
![[Talks.cam]](/static/images/talkslogosmall.gif)


Friday 01 June 2012, 15:15-16:15