Skip to content

TypeShape: Practical Generic Programming in F# with Eirik Tsarpalis

Photo of Richard Minerich
Hosted By
Richard M.
TypeShape: Practical Generic Programming in F# with Eirik Tsarpalis

Details

Datatype generic programming (http://www.cs.ox.ac.uk/jeremy.gibbons/publications/dgp.pdf) refers to an assortment of techniques, libraries and language extensions used for defining programs that are parameterized by datatypes, or rather by shapes of datatypes. Popularized by work such as Scrap Your Boilerplate (http://research.microsoft.com/en-us/um/people/simonpj/papers/hmap/) and Generic Haskell (http://www.cs.uu.nl/research/projects/generic-haskell/), its applications include pretty-printers, serializers and random value generators. While similar work (http://www.staff.science.uu.nl/~swier004/publications/2015-wgp.pdf) has been done in F#, most .NET applications "out there" rely on tedious use of reflection which results in inefficient, hard-to-read implementations that are prone to breakage. In this talk I'll be presenting TypeShape (https://github.com/eiriktsarpalis/TypeShape), a small library for generic programming with emphasis on practical application and extensibility. TypeShape takes advantage of F# active patterns and object expressions to concisely define extensive, generic programs. It is already being used in real-world libraries such as FsPickler (http://mbraceproject.github.io/FsPickler/) and FSharp.AWS.DynamoDB (https://github.com/fsprojects/FSharp.AWS.DynamoDB).

Eirik George Tsarpalis is a mathematician who's been a professional F# developer for the past 4 years. He's core developer and primary contributor to the MBrace project and has authored an assortment of open source tools including FsPickler (http://nessos.github.io/FsPickler/), Argu (http://nessos.github.io/Argu/), Vagabond (http://nessos.github.io/Vagabond/) and QuotationCompiler (https://github.com/eiriktsarpalis/QuotationCompiler).

Schedule:

6:30-7:00 Pizza

7:00-8:30 Talk

8:30-?:?? Pub Time

Photo of New York City F# User Group group
New York City F# User Group
See more events
Empire State Building
350 5th Avenue · New York, NY