intermediate

Handling short codes — part II---Andrzej Krzemieński

Second part of a discussion about designing a type storing character strings of length N (known at compile-time and sufficiently small).

Handling short codes - part II

by Andrzej Krzemieński

From the article:

Today, we will continue with the implementation of a type capable of storing short codes. For the previous post on the subject see here. This time, we will focus on type safety...

Functional C++--Kevlin Henney

See the talk Kevlin Henney gave at the NDC this june:

Functional C++

by Kevlin Henney

What you will find in the video:

Functional C++? As opposed to what - dysfunctional? Well, kind of, yeah. Sure, in C++ the principal unit of composition is called a function, but that doesn't mean it's a functional language. And the idea of restricting mutability of state gets a nod with const, but it's a nod not a hug. And the STL shows influences of functional programming, although it falls short of being compositional. And, yes, sure, C++11 has lambdas, but then again, these days, who doesn't? Lambda calculus was invented in the 1930s.
This talk looks at how to express functional programming ideas in (post)modern C++ in a way that can be considered idiomatic to C++, rather than trying to use the power of overloading and metaprogramming to pretend C++ is Haskell or Lisp. In short, immutability beyond const and into shared and persistent data structures, concurrency beyond threading and locks, and thinking about functions as transformations and units of composition rather than actions.

CppCon 2014 Making C++ Code Beautiful--James McNellis & Kate Gregory

Have you registered for CppCon 2015 in September? Don’t delay – Early Bird registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2014 for you to enjoy. Here is today’s feature:

Making C++ Code Beautiful

by James McNellis & Kate Gregory

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Ask a non-C++ developer what they think of C++ and they'll give the language plenty of compliments: powerful, fast, flexible, and "the language for smart people". But along with that you are likely to hear ugly, complicated, hard to read, and "the language for smart people". Is it possible to write beautiful C++? Not arcanely elegant or wickedly compact, but readable, clear, expressive - beautiful! We say it is, and we want to show you how.

In this session, you'll see how to turn pages of "comic book characters swearing" into code you'll be proud to call your own. By making your code express your intent, using the power of new language and library functionality, and leaving hard-to-read constructs out of your vocabulary, you can give your code a makeover that will stand the test of time.

CppCon 2014 How to call C libraries from C++--Lisa Lippincott

Have you registered for CppCon 2015 in September? Don’t delay – Early Bird registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2014 for you to enjoy. Here is today’s feature:

How to call C libraries from C++

by Lisa Lippincott

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Many libraries used by C++ programs present C-like interfaces that are compatible with C++, but are not directly compatible with good C++ style. Using these libraries directly is error-prone in many of the ways C++ is designed to avoid. It is better to pass through an interface layer that presents good C++ style on the C++ side.

But writing such an interface layer is daunting. Completing it may be an enormous task, as are documenting it and maintaining it as the underlying library evolves. To address this problem, I will present a style of writing such interfaces that can be used incrementally as needed, and that reduces documentation cost. I will also present a small library that supports the writing of interface layers in this style.

HPX and C++ Dataflow(await) -- Hartmut Kaiser

Uses/Implementation/Discussion about await feature in modern C++.

HPX and C++ Dataflow

by Hartmut Kaiser

From the article:

We have done some experiments with a preliminary implementation of await in Visual Studio 2015RC. We were able to integrate it well with the futures in HPX and the results are very promising. Unfortunately, the await keyword (and resumable functions) will only be available in all mainstream compilers years from today. So for now we will have to make do with our poor-man’s-await –dataflow.

In any case, if you want to try things out (including dataflow), please fork HPX from our Github site and tell us what you think.

CppCon 2014 Modern Template Metaprogramming: A Compendium, Part II--Walter E. Brown

Have you registered for CppCon 2015 in September? Don’t delay – Early Bird registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2014 for you to enjoy. Here is today’s feature:

Modern Template Metaprogramming: A Compendium, Part II

by Walter E. Brown

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

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 new type_traits candidate whose use has been described by one expert as "highly advanced (and elegant), and surprising even to experienced template metaprogrammers."

CppCon 2014 Modern Template Metaprogramming: A Compendium, Part I--Walter E. Brown

Have you registered for CppCon 2015 in September? Don’t delay – Early Bird registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2014 for you to enjoy. Here is today’s feature:

Modern Template Metaprogramming: A Compendium, Part I

by Walter E. Brown

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

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 new type_traits candidate whose use has been described by one expert as "highly advanced (and elegant), and surprising even to experienced template metaprogrammers."

CppCon 2014 Practical Functional Programming in C++--Bryce Adelstein-Lelbach

Have you registered for CppCon 2015 in September? Don’t delay – Early Bird registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2014 for you to enjoy. Here is today’s feature:

Practical Functional Programming in C++

by Bryce Adelstein-Lelbach

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

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++.

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.