C++Now 2015 has ended
Please visit the C++Now website.
Back To Schedule
Thursday, May 14 • 2:30pm - 4:00pm
Functions Want To Be Free

Log in to save this to your schedule, view media, leave feedback and see who's attending!

When designing a class, what do you make a member function, x.f(), and what do you make a free function, f(x)? When extending an already existing class, do you provide extra functionality with inheritance, composition, or adding new free functions? Do friend functions really violate encapsulation?

This presentation will cover techniques that not only allow safe and efficient interfaces, but also simplify your code. We will combine ideas from generic programming and object-oriented programming to achieve these goals. This talk will start with the basics of good engineering principles and build up from these to explain how to write scalable software. By taking a thoughtful approach to what should be a member function and what should be a free function, you can reduce code duplication and code size, thereby reducing the surface area for bugs.


avatar for David Stone

David Stone

Vice President, Markit
David Stone has spoken at C++Now and Meeting C++. He is the author of the bounded::integer library: http://doublewise.net/c++/bounded/ and has a special interest in compile-time code generation and error checking, as well as machine learning. He works at Markit integrating real-time... Read More →

Thursday May 14, 2015 2:30pm - 4:00pm MDT
Flug Auditorium

Attendees (0)