CppCon 2016: Leak-Freedom in C++... By Default--Herb Sutter

Have you registered for CppCon 2017 in September? Don’t delay – Registration is open now.

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

Leak-Freedom in C++... By Default

by Herb Sutter

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Lifetime safety means writing code that, by construction, is guaranteed to eliminate two things: (a) use of null/dangling pointers (including pointerlike things such as references, iterators, views, and ranges), and (b) leaks (including the rare 1% case where we’re tempted to admit the possibility of an ownership cycle or need to support lock-free concurrent data structures).

Last year, my CppCon 2015 talk “Writing Good C++14… By Default” focused on (a), null/dangling, because it's the more difficult and usually more serious problem. I gave an overview of a new approach of using static analysis rules to eliminate use of null and dangling in C++. That work continues and we’re in the process of writing down the formal rules for the approach that I showed last year.

This year, the focus will be on (b), leaks: The talk aims to begin with a set of simple rules, the “5-minute talk” to demonstrate that a handful of rules can be taught broadly to programmers of all levels, and results in code that is clean and free of leak bugs by construction.

But, since we’ll still have 85 minutes left, we can use the time to spelunk through a series of “Appendix” code examples, in which we'll demonstrate "why and how" to apply those rules to a series of increasingly complex/difficult situations, and that are aimed at increasingly advanced and “clever” (note: not always a good thing) programs and programmers. We’ll address questions such as: How should we represent Pimpl types? How should we represent trees – what should the child and parent pointer types be, and (when) should they be unique and when shared? How should we deal with “intra-module” or “encapsulated” cycles when you control all the objects in the cycle, such as all the nodes within a Graph? And what about “inter-module” or “compositional” cycles when you don’t know in advance about all the objects that could be in the cycle, such as when combining libraries written by different people in a way that may or may not respect proper layering (notoriously, using callbacks can violate layering)? The answers focus on cases where we have solid guidance, and then move toward some more experimental approaches for potentially addressing the ~1% of cases that aren’t yet well covered by unique_ptr, shared_ptr, and weak_ptr.

Packing Bools, Performance tests

Can you pack 8 bools into one BYTE efficiently?

Packing Bools, Performance tests

by Bartlomiej Filipek

From the article:

The simple problem of packing seems to show a lot of performance issues. If the packing is really needed? Can we make the code parallel? What are the branching effects here?

CppCon 2016: The Evolution of C++ Past, Present and Future--Bjarne Stroustrup

Have you registered for CppCon 2017 in September? Don’t delay – Registration is open now.

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

The Evolution of C++ Past, Present and Future

by Bjarne Stroustrup

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

This is a philosophical talk. It deals with ideals, aims, and ways of approximating those. It deals with practical constraints and risks. It gives short examples. It presents a perspective of what drives the evolution of C++. What is C++ and what it must become over the next years for its success to continue? This involves both social and technical points. Towards the end, I discuss the direction of C++ future evolution, give some opinions, point to urgently needed new features, and discuss how to manage until they are part of the standard.

C++ for Embedded Developers, 26-30 June, UK

Join us to gain practical experience of writing C++ for real-time and embedded systems in Swindon, UK.cropped-blog-header1.png

C++ for Embedded Developers

About the course:

This course is designed for:

  • real-time engineers embarking on a project using C++ for the first time
  • developers looking to move from C to C++ (as it will clearly demonstrate both the strengths and weaknesses of C++ vs. C)

Course overview

The course introduces the C++ language for use on real-time and embedded applications. It highlights areas of concern for real-time and embedded development. The focus is on developing core object-oriented programming skills and understanding of how to build effective, maintainable and efficient C++ programs.

Attendees perform hands-on embedded programming, on target hardware, during course practicals. Approximately 50% of the course is given over to practical work.

Course objectives

  • To provide a solid understanding of the essentials of the C++ programming language.
  • To give you practical experience of writing C++ for real-time and embedded systems.
  • To give you the confidence to apply these new concepts to your next real-time project.

Delegates will learn

  • The core C++ syntax and semantics
  • How to access hardware in the language
  • How to program interrupt handlers in C++
  • About memory and performance issues associated with C++
  • How real time operating systems (RTOS) affect the use of the language

Click here to learn more or book a place

Learning Modern C++ from Scratch -- Giovanni Dicanio

There's a new video course published in the Pluralsight library, designed to take the learners from zero to being productive with basic elements of modern standard C++:

Learning Modern C++ from Scratch

by Giovanni Dicanio

From the blog post:

C++ is a language having a reputation of being hard to learn.

In this C++ course of mine published by Pluralsight, I did my best to prove the opposite: C++ can be learned in a simple, interesting, and fun way!

I used a variety of engaging visuals, metaphors and example demo code to try to teach modern, clear, good C++ from scratch, from the beginning, without any previous programming knowledge.

And, even if you already know C++, you may have fun watching this course as well.

 

CppCon 2016: Grill The Committee Panel

Have you registered for CppCon 2017 in September? Don’t delay – Registration is open now.

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

Grill The Committee Panel

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

What would you like to know about the C++ standard?
Join us for a panel discussion with the leaders of the C++ standards committee where the audience asks the questions.

CppCon 2017 Call for Submissions

Share what you've learned about C++.CppCon

Call for Submissions

by CppCon

From the announcement:

Have you learned something interesting about C++, maybe a new technique possible in C++14/17? Or perhaps you have implemented something cool related to C++, maybe a new C++ library? If so, consider sharing it with other C++ enthusiasts by giving a regular program talk at CppCon 2017.

The submissions deadline is June 11 with decisions sent by July 12.

ACCU 2017 trip report--Anastasia Kazakova

You want to know what happened?

ACCU 2017 trip report

by Anastasia Kazakova

From the article:

Hi,

We’ve just returned from ACCU 2017 in Bristol, UK. Being amazed by the event I decided to share some notes here, and hope Phil will also jump in and share his impression. There are also reports by Vittorio Romeo, Simon Brand and Samathy Barratt which you might find interesting...