Sumant Tambe

Sumant is a Sr. Software Engineer at LinkedIn and a Microsoft MVP. He helps run Kafka and the related streaming infrastructure at LinkedIn. He contributes in open-source Apache Kafka and writes Kafka Truths and C++ Truths blogs. Previously he worked on reactive stream processing for Industrial IoT system in RTI.


Composable Generators and Property-based Testing in C++14

Level :
Date :
11:15 AM Saturday
Room :
Interested : (47) - Registered : (-)

Speakers: Sumant Tambe

C++14 has an enviable collection of functional programming features such as generic lambdas, type inference, variadic templates, function types with co-/contra-variance and so on. With mature compiler support, designing and implementing performant functional-style libraries has become very pleasant in modern C++. Tools and techniques (e.g., property-based testing) enjoyed by the programmers in only elite functional languages (Haskell, Scala) now appear to be within C++'s reach. This presentation will discuss two classic techniques from the functional domain -- composable data generators and property-based testing -- implemented in C++14 for testing a generic serialization and deserialization library (RefleX). We will look at techniques of constructing complex generators using a random number generator and a tolerable dose of monoids, functors, and of course, monads. We won't stop there though! We will look at automatic type generators using C++ TMP. Equipped with data and type generators, we'll take property-based testing to a whole new level where lazy programmers don't have to do anything to test their programs beyond just compilation and running the test over and over.

  • Not Interested
  • Interested