CppCon Program Highlights, 12 of N: Advanced Meta Techniques

The CppCon 2014 conference program has been posted for the upcoming September conference. We've received requests that the program continue to be posted in "bite-sized" posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

No C++ conference would be complete without coverage of advanced techniques that enable high performance, expressive power, or both at the same time. Here is a selection of some of the advanced topics that will be presented this year at CppCon.

In this post:

  • Practical Functional Programming in C++
  • Practical Type Erasure
  • Pragmatic Type Erasure: Solving Classic OOP Problems with an Elegant Design Pattern
  • Polymorphism with Unions
  • Modern Template Metaprogramming: A Compendium

 

Practical Functional Programming in C++

To the untrained eye, pure functional programming may appear to be out of place in our traditionally imperative C++ world. However, the functional paradigm has become increasing prominent in production C++ codes, especially when implementing asynchronous execution.

This talk is intended as a primer for attendees who are either unfamiliar with functional programming or have doubts its practical uses in modern C++. The following topics will be covered:

* Functions as First-Class Entities (function objects, lambdas, Callable, std::function) * Higher Orders (, composition/bind) * Functions with Clear Inputs/Outputs (pure functions - side effect free) * Monads and Parallelism (future/promise, async)

Examples from different sectors of industry/academia will be presented throughout.

No prior functional programming knowledge will be needed. While this talk will cover some theory, coverage of non-C++ programming languages will be minimal. The focus of this talk will be the application of theories from FP to C++, not FP itself.

Speaker: Bryce Adelstein-Lelbach. Bryce Adelstein-Lelbach is a researcher at the Center of Computation and Technology (CCT) at Louisiana State University. He works on the HPX runtime system and his research interests include parallel and distributed programming frameworks for scientific applications. He has been working on HPX for over a year now.

 

Practical Type Erasure

Type erasure looks like a neat concept, but what are its real life uses? This talk will briefly show the inner workings of type erasure, and demonstrate a real working implementation of a configuration system from public domain production code. Uses and pitfalls of type erasure will also be covered.

Speaker: Cheinan Marks, Spiral Genetics. As an engineer with a chemical engineering background, Cheinan is interested in practical code and wants to take the latest advances both in science and programming and use them in real life working code along with applying engineering principles to software development. Cheinan is a senior developer at Spiral Genetics, Inc. in Seattle.

 

Pragmatic Type Erasure: Solving Classic OOP Problems with an Elegant Design Pattern

There are numerous, serious OOP design problems that we have all encountered in production code. These include, among others: - object lifetime/ownership - how to make classes from different class hierarchies conform to a common interface - writing classes that can present multiple interfaces - separating interface and implementation - how to write virtual functions so that subclasses override them properly - the virtual inheritance "diamond of death"

Proper use of type erasure can mitigate, or outright eliminate, these and other problems, without sacrificing performance.

This talk will cover the OOP design problems above and more, and will cover hand-rolled and library-based type erasure approaches that solve those problems. Performance metrics will be provided for the different approaches, and source code will be available after the talk.

Speaker: Zach Laine, Senior Programmer, Intific. Zach Laine has been using C++ in industry for 11 years, focusing on data visualization, numeric computing, games, generic programming, and good library design. He finds the process of writing bio blurbs to be a little uncomfortable.

 

Polymorphism with Unions

Using tagged unions to create families of polymorphic types that are more flexible and more easily maintained than those formed with inheritance alone. We demonstrate the design pattern and implementation techniques of sum types with examples from a compiler development project. We also examine the technique's impact on project management and engineering and on algorithm design, including the role of type switches, value type semantics, and multiple dispatch polymorphism.

Speaker: Jason Lucas, Architect, Orly Atomics. Jason Lucas is an alum of the Microsoft Visual C++ team and has been writing extensively in C++ since the early 90s. He is the architect for Orly, an open source, large-scale, distributed, transactional, and consistent graph database (all in C++) which also includes a compiler for distributed programs.

 

Modern Template Metaprogramming: A Compendium

Template metaprogramming has become an important part of a C++ programmer's toolkit. This talk will demonstrate state-of-the-art metaprogramming techniques, applying each to obtain representative implementations of selected standard library facilities. Along the way, we will look at void_t, a recently-proposed, extremely simple new candidate whose use has been described by one expert as "highly advanced (and elegant), and surprising even to experienced template metaprogrammers."

Speaker: Walter E. Brown . With broad experience in industry, academia, consulting, and research, Dr. Walter E. Brown has been a C++ programmer for over thirty years, joining the C++ standards effort in 2000. Among numerous other contributions, he is responsible for introducing such now-standard C++ library features as cbegin/cend and common_type as well as headers and , and has significantly impacted such core language features as alias templates, contextual conversions, and variable templates. He conceived and served as project editor for the International Standard on Special Mathematical Functions in C++. When not playing with his grandchildren, Dr. Brown is an Emeritus participant in the C++ standards process, with several more core and library proposals under consideration. He was recently appointed an associate project editor for the C++ standard itself.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.