Presentation is loading. Please wait.

Presentation is loading. Please wait.

Modern C++ Programming: Current State and New Horizons

Similar presentations


Presentation on theme: "Modern C++ Programming: Current State and New Horizons"— Presentation transcript:

1 Modern C++ Programming: Current State and New Horizons
17 14 Saeed Amrollahi Boyouki 1y 11 IRAN University of Science and Technology (IUST) Department of Computer Engineering May 2014 C++ 0x 98 03

2 About me … $ who am i Shahid Beheshti university: BA in Software Engineering Azad university: MA in Software Engineering 16 years of experience in C++ programming I have never had a course on C++ I am the first and only representative of IRAN at C++ standardization committee meetings at Frankfurt (July 2009), Rapperswil (August 2010) and Hawaii (2012) and I paid everything myself.

3 What is C++? Many C++ design decisions have their roots in my dislike for forcing people to do things in some particular way. - Bjarne Stroustrup C++ is a general-purpose programming language with a bias towards systems programming that is a better C supports data abstraction supports object-oriented programming supports generic programming C++ is a language not a complete system. C++ is a multi-paradigm programming language. It’s still very useful definition.

4 What is C++? 2011- C++ is a light-weight abstraction programming language. The key strengths of a C++ are in the area of Software infrastructures Resource-constrained applications Web Services/Applications Native code, System programming, Library building Applications (Browsers, DBs, Graphics, Games, …) Infrastructures Software (like OSs, VMs, Embedded systems, …) Hardware Operating systems, Embedded systems, Networking, Compilers, Graphics, Database systems, GUIs, Telecommunications, Search engines, Trade engines, Command and control systems, Games, …

5 C++0x roadmap Living languages must change, must adapt, must grow.
– Edward Finegan 2,000,000 <= Number of C++ programmers <= 4,000,000 It’s close to 4,000,000 C C99 C1x Simula C++98 C++03 C++11 C++1y 1967 1978 1998 1999 2003 2011 2014 2017 C++0x = C++11 x = B C++1y = C++1? probably y = 7 In this seminar: C++98 = C++03 C++11- SRTTU

6 Taste C++11 C++ feels like a new language. - Bjarne Stroustrup
An overview on iota generic algorithm Simple asynchronous operations Concurrent accumulation

7 Sequence containers population
vector<int> v1(100); // 100 integers with value 0 vector<int> v2(100, -1); // 100 integers with value -1 vector<int> v3{0, 1, 2, 3}; // C++11 initializers list vector<int> v4(100); // fill v4 with values: 0, 1, 2, … 99 vector<int> v4; // empty vector for (vector<int>::size_type sz = 0; sz < v4.size(); ++i) { v4.push_back(sz); } // another method for (vector<int>::size_type sz = 0; sz < v5.size(); ++sz) { v5[sz] = sz; To fill sequence containers incrementally

8   Iota 11 iota is a new generic algorithm in C++11.
More than 30 new generic algorithms were added to C++11. template <class ForwardIterator, class T> void iota(ForwardIterator first, ForwardIterator last, T value); Requires: T shall be convertible to ForwardIterator’s value type. The expression ++val, where val has type T, shall be well formed. Effects: For each element referred to by the iterator i in the range [first,last), assigns *i = value and increments value as if by ++value. Complexity: Exactly last - first increments and assignments. header file : <numeric> Input Iterator =*p -> == != ++ It’s not inheritance! Forward Iterator *p=

9 iota and fundamental types
Here it is a complete program that uses iota with fundamental types: // iota_practice.c++ #include <numeric> #include <vector> #include <list> #include <iostream> #include <array> int main() { using namespace std; vector<int> vi( ); list<double> lst( ); array<char, 26> lower_case; // array is new container vector<long long> vll(10); // long long is a new fundamental data type iota(vi.begin(), vi.end(), 0); // 0, 1, 2, ..., iota(lst.begin(), lst.end(), 0.0); // 0.0, 1.0, 2.0, … iota(lower_case.begin(), lower_case.end(), 'a'); // 'a', 'b', … 'z' iota(vll.begin(), vll.end(), 0LL); // 0LL, 1LL, 2LL, … 9LL for (auto c : lower_case) cout << c << ‘ ‘; // range-based for loop cout << ‘\n’; return 0; } about coding styles C++11: array container, long long data type, range-based for loop and auto

10 iota cont. A typical/likely implementation of iota
// under Code::Blocks (Release mode) $ g++ -std=c++11 –pedantic –Wall –O3 iota_practice.c++ -o iota_practice $ ./iota_practice a b c d e f g h i j k l m n o p q r s t u v w x y z Process returned 0 (0x0) execution time: s A typical/likely implementation of iota namespace std { template<class ForwardIterator, class TYPE_> void iota(ForwardIterator first, ForwardIterator last, TYPE_ t) { for (auto it = first; it != last; ++it, ++t) // prefix ++ *it = t; } Pre increment vs. Post increment The value of ++x, is the new (that is, incremented) value of x. The value of x++, is the old value of x. y = ++x; // y = (x += 1) or ++x; y = x; y = x++; // y = (t = x, x += 1; t) or t = x; x++; y = t; ++x means to increment x and return the new value, while x++ is to increment x and return the old value. iota uses prefix ++ increment.

11 iota and user-defined types
Rational numbers, 2D points and SE Closing prices, … 1. // rational.h class Rational { // non-normalized run-time rational number int numerator_, denominator_; public: Rational() : numerator_{0}, denominator_{1} {} // new initialization // syntax // other ctor(s), relop(s), other member functions Rational& operator++() { numerator_ += denominator_; return *this; } }; (0, 0) 2. // point.h class Point { // 2D point int x_, y_; public: Point() : x_{0}, y_{0} {} // ctor(s), graphics-related member functions Point& operator++() { ++x; ++y; return *this; } }; (n-1, n-1)

12 iota and user-defined types
3. // price.h class price_stepper { // price stepper for a typical securities exchange double price_; public: static const double STEP{0.05}; // new syntax for uniform initialization static const double FACE_VALUE{ }; price_stepper() : price_{FACE_VALUE} {} // default ctor price_stepper(double price) : price_{price} {} operator double() const { return price_; } price_stepper& operator++() { price_ += STEP; return *this; } }; 4. // gadget.h class FuturisticGadget { // An Unidentified futuristic gadget: 22 century public: FuturisticGadget& operator++() { /* … */ } }; Template duck typing: If it looks like a duck, walks like a duck, and quacks like a duck..., so it’s a duck.

13 iota and user-defined data types
Complete program #include <array> #include <numeric> #include <vector> #include <list> #include <iostream> #include “point.h” #include “rational.h” #include “price.h” #include “gadget.h” int main() { using namespace std; array<Point> vp(10000); list<Rational> lr(100000); vector<price_stepper> p_list(100000); iota(vp.begin(), vp.end(), Point()); // [point(0, 0), point(9999, 9999)] iota(lr.begin(), lr.end(), Rational()); // [ iota(lower_case.begin(), lower_case.end(), 'a'); // 'a', 'b', .. 'z' iota(vll.begin(), vll.end(), 0LL); // 0LL, 1LL, 2LL, 9LL return 0; }

14 C++11 Concurrent programming facilities- from top to button
async High-level concurrency Task-based concurrency future, promise, packaged_tasks mutexes , locks and condition_variables Low-level/System-level concurrency Thread-based concurrency Threads (Construction, Launch) OS Threads (Windows, Posix) Hardware

15 Non-member functions begin and end
Simple Async 98 11 #include <string> // for string #include <algorithm> // for reverse #include <vector> // for vector #include <future> // for async and future #include <iostream> // for cout std::string flip(std::string s) { std::reverse(std::begin(s), std::end(s)); return s; } int main() std::vector<std::future<std::string>> v; v.push_back(std::async([]{ return flip(" ,olleH"); })); v.push_back(std::async([]{ return flip(" tnerrucnoc"); })); v.push_back(std::async([]{ return flip("\n!dlrow"); })); for (auto& e: v) std::cout << e.get(); return 0; Non-member functions begin and end Right angle bracket Async Future Auto initialization Lambdas Range-based for loop

16 Future and async The class template future defines a type for asynchronous return objects which do not share their shared state with other asynchronous return objects. The function template async provides a mechanism to launch a function potentially in a new thread and provides the result of the function in a future object with which it shares a shared state. task Returns Async function get member function future value thread

17 Accumulate function 98 The generic accumulate function
template <class InputIterator, class T> T accumulate(InputIterator first, InputIterator last, T init); Effects: Computes its result by initializing the accumulator acc with the initial value init and then modifies it with acc = acc + *i for every iterator i in the range[first,last) in order. Requires: T shall meet the requirements of CopyConstructible and CopyAssignable types. Complexity: Exactly last - first increments and assignments. header file : <numeric> Example: /* read doubles from standard input and compute the summation */ vector<double> values; double x; while (cin >> x) // read until we have values.push_back(x); double sum = accumulate(values.begin(), values.end(), 0.0);

18 Concurrent Accumulation
#include <numeric> #include <vector> #include <future> template<class T>T accum(T* begin, T* end, T init) { return std::accumulate(begin, end, init); } template<class T, class V> struct Accum { T *b, *e; V val; Accum(T* bb, T* ee, const V& v) : b{bb}, e{ee}, val{v} {} V operator()() const { return std::accumulate(b, e, val); };

19 Concurrent accumulation
template<class T> T comp(std::vector<T>& v, int size, int cc) { if (v.size() < size) // use sequential accumulate return std::accumulate(v.begin(), v.end(), 0.0); else { auto f0{std::async(Accum(v.begin(), &v[v.size()/cc], 0.0))}; auto f1{std::async(accum(&v[v.size()/cc], &v[v.size() * 2 / cc], 0.0))}; auto f2{std::async(accum(&v[v.size() * 2 / cc], &v[v.size()*3/cc, 0.0))}; auto f3{std::async(accum(&v[v.size() * 3 / cc, v.end(), 0.0))}; return f0.get() + f1.get() + f2.get() + f3.get(); } int main() vector<double> v( ); iota(v.begin(), v.end(), 0.0); cout << comp(v, 10000, 4) << '\n'; return 0;

20 1 2 3 RAII- Resource Acquisition is Initialization 98
One of the key tasks of any non-trivial program is to manage resources. For a long-running program, failing to release a resource in a timely manner can cause serious performance degradation and possibly crash. Resource: any entity that a program acquires and releases. Examples: memory, file handles, thread handles, locks, sockets, timer, transactions, network connection, data base connection, … RAII is about Resource Management. 1 A basic technique for resource management based on scopes. - Bjarne Stroustrup programming Principles and Practice Using C++, page 1175. 2 A simple technique for handling resources in programs using exceptions. One of the keys to exception safety. - Bjarne Stroustrup Glossary page 3 RAII is a programming idiom or technique used for exception-safe resource management. - Wikipedia

21 Constructors, destructors and resources
Resource Release Initialization Destructor Constructor Resource Acquisition Cleanup A destructor is used to destroy objects of its class type. A constructor is used to initialize objects of its class type. Destroy = cleanup class X { // the empty class }; Compiler generates class X { public: X() = default; // default constructor X(const X&) = default; // copy constructor X(const X&&) = default; // move constructor X& operator=(const X&) = default; // copy assignment op. X& operator=(const X&&) = default; // move assignment op. ~X() = default; // destructor // … };

22 Scope-based Resource Management
A basic technique for resource management based on scopes. - Bjarne Stroustrup programming Principles and Practice Using C++, page 1175. class X { X(); ~X(); // … }; void f() { X x; // constructor vecor<int> v; string s(“Hello, world”); } // calling destructor(s) at the end of scope (in reverse order)

23 Resource Acquisition Is Initialization
RAII and standard library abstractions vector string map list Resource Acquisition Is Initialization other containers lock_guard/unique_lock shared_ptr/unique_ptr threads

24 Literals 98 Fundamental types C++11 C++data types User-defined types
char short int long float double long double bool wchar_t char16_t char32_t long long C++11 C++data types User-defined types Fundamental types = Built-in types Each fundamental type has set of values called literals. literal is notation that directly specifies a value for fundamental values. - Bjarne Stroustrup Programming- Principles an Practice Using C++, page 1174. Example: // C++98 fundamental types and their literals bool b = true; // true and false are literals for bool type char c = ‘A’; // (narrow) character literal short s = 42; // short int int i = 1; // 1 is integer literal long L = 1L; // the suffix L makes a long literal float f = 1.0f // single precision floating point literal double d = 1.0 // the double precision floating point literal wchar_t wch = L’A’ // (wide) character 98

25 11 14 Literals, cont. Example:
// C++98 fundamental types and their literals, continued int* p = 0; // 0 was pointer literal const char* str = “hello, world”; // char. string literal const wchar_t* ws = L”Hello, world”; // the wide char. string literal C++11 has three new fundamental types: long long, char16_t and char32_t 11 // C++11 fundamental types and their literals long long GE = ; // great embezzlement in IRR:) long long big_one = 1LL; // LL makes a long long literal int* p2 = nullptr; // nullptr is pointer literal char16_t c1 = u’h’; // 16-bit char. literal char32_t c2 = U’h’; // 32-bit char. literal const char16_t* s1 = u”Hello, world”; // 16-bit char. string literal const char32_t* s2 = U”Hello, world”; // 32-bit char. string literal 14 // C++14 fundamental types and their literals unsigned char a = 0b ; // binary literal

26 Automatic variables 98 1. Static languages: Fortran, Algol, C, C++, Java, … Dynamic languages: Lisp, Python, … State the type of variables clearly Deduce the type of variables with the assigning values In C++98, the programmer must state the type of variables. Compiler prefers type to initializer. <type-specifier> variable-name = initializer opt ; Python answer = 42 # answer is now an int answer = 42.1 # answer is now a float double g = 9.81f; // g is double int answer = 42.1; // answer = 42 2. Global variable bool b; // non-local variable: b = false int main() { long long LL; // uninitialized auto long long LL; // redundant auto. rather verbose auto std::string s; // calling default ctor return 0; } // Local variables Automatic storage

27 Auto: type deduction from initializer
11 Third approach: Compiler can figure out the type of expressions at compile-time. Design-time Compile-time Run-time Deduce types at Run-time based on assignment Lisp/Python Specify types at design-time C/C++ Deduce types at compile-time from initializers C/C++ The original auto is generally useless keyword. Recycle the keyword auto: 1) To remove the old redundant usage 2) New responsibility: Determine or deduce the type of expressions from initializer New mission of auto int x = 5; // verbose: the int is redundant auto x = 5; // OK: x is int because 5 is int auto <variable> = expression

28 Using auto Basic examples: Initialization vs. Assignment Examples … 1.
auto pi = 3.14; // pi is double, because 3.14 is double (by default) auto pi_ptr = π // pointer to double auto big_one = 1LL; // big_one is long long because LL suffix template<class T> T* Factory(T t) { return new T(t); } auto clone1 = Factory(1); // clone1: int* auto clone2 = Factory(2.0f), // clone2: float* auto clone3 = Factory(complex<double>{1, 1}); // clone3: complex<double>* Initialization vs. Assignment auto big_one = 1LL; // initialization: big_one is long long forever big_one = 1UL; // assignment: big_one is still long long Examples 1. // the today (opening, closing) prices of symbols at NASDAQ map<string, pair<double, double>> price; // print the content of map for (map<string, pair<double, double>>::iterator it = price.begin(); it != price.end(); ++it) { cout << it->first << ‘\t’ << ‘[‘ << it->second.first << ‘,’ << it->second.second << ‘]’ << ‘\n’; } MSFT 27.56 DELL 28.10 15.16 15.34 ORCL 26.70 26.93 2. for (auto it = price.begin(); it != price.end(); ++it) { cout << it->first << ‘\t’ << ‘[‘ << it->second.first << ‘,’ << it->second.second << ‘]’ << ‘\n’; }

29 for (initialization-statement condition opt; expression opt) statement
Range-based for loop Conventional general for statement: You can do almost anything. for (initialization-statement condition opt; expression opt) statement int a[10]; for (int i = 0; i <=10; ++i) { a[i] = 0; } off-by one error Common idiom in C++ programming: Iterator through a container from begin to end Rather verbose 1. void print(list<int>& L) { for (list<int>::const_iterator cit = L.begin(); cit != L.end(); ++cit) cout << *cit << ‘\n’; } Looks like difficult 2. void print(list<int>& L) { ostream_iterator<int> os(cout, “\n”); copy(L.begin(), L.end(), os); }

30 Lambda expressions λ 11 Lambda expressions provide a concise way to create simple function objects. Lambda expressions = Lambda functions = Lambdas [ Captures opt ] ( Parameters opt ) -> Return Type opt { Statements; } Lambda introducer C++11: Modern style code: 2008- #include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int> v = {-10, -7, -3, 0, 1, 4, 9, 10, 20, 31, 40, 41, 45, 64, 99}; int main() { auto cit = find_if(v.begin(), v.end(), [](int n) { return n > 0; }); if (cit != v.end()) cout << *cit << ‘\n’; // 1 return 0;

31 Constants C++ has always had the concept of constant expressions  from 1985 const double PI = ; // don’t change the content of PI char* hi = “Hello, world”; // “Hello, world” is constant character literal const char* hi = “Hi”; // pointer to constant data char* const hello = “Hello”; // constant pointer to character const char* const Hawaii = “Aloha”; // constant pointer to constant character class Point { int x, y; const int z; // constant data member public: Point(int xx, int yy) : x(xx), y(yy), z(0) {} int GetX() const { return x; } // constant member function int GetY() const { return y; } void SetX(int xx) { x = xx; } // non-constant member function }; const Point Center(0, 0); // constant object void f(const Point); // copy semantics: don’t change the content of argument void g(const Point&); // reference semantic: don’t change the // more … const’s primary function is to express the idea that an object is not modified through an interface. constant advantages: Excellent optimization opportunities for compilers, more maintainable code.

32 Conventional constants- problems
1. The constant expressions may be or may be not evaluated at compile-time. const double PI = ; const double GRAVITY_CONSTANT = 9.81; // m/s2 const int FACE_VALUE = 1000; // the face value of each share at TSE (in IRR) Example: array bound // array_bound.c++ int get_five() { return 5; } long long LA[get_five() + 10]; // error: array bound is not an integer constant $ g++ -c -std=c++98 array_bound.c++ error: array bound is not an integer constant The problem is from the point of theoretical view, get_five() isn’t constant expression. Embedded system programming: Read-Only Memory (ROM)

33 Constant expressions 11 I mean, generalized and guaranteed constant expressions. Generalized and guaranteed constant expressions (constexpr) extends compile time evaluation to variables of fundamental types as well as variables of user-defined types and functions. constexpr is a new keyword in C++11. constexpr is kind of specifier. // array_bound.c++ #include <iterator> // for std::begin and end #include <algorithm> // for std::fill constexpr int get_five() { return 5; } long long LA[get_five() + 10]; // OK std::fill(std::begin(LA), std::end(LA), 42LL); $ g++ -c -std=c++11 array_bound.c++ $ 2. The constexpr mechanism Provides more general constant expressions Allows constant expressions involving user-defined types  ROM Provides a way to guarantee that an initialization is done at compile time.

34 vs. const vs. constant expressions
both const and constexpr are mechanisms to specify immutability. const int i = 0; constexpr int ii = 0; void f() { ++i; // error: increment of read-only variable ‘i’ ++ii; // error: increment of read-only variable ‘i’ } const is meaning roughly: I promise not to change this value. constexpr is meaning roughly: to be evaluated at compile time. Do not modify in this scope Evaluate at compile time vs. const constexpr const: conventional constants constexpr: generalized and guaranteed compile-time evaluation constants

35 C-style pointers problems
1. Pointers don’t have the value semantic. int and std::string are perfect examples of types with value semantics. int i = 0; int j = i; // copy j = i; // assignment string s = “A string …”; string t = s; // another string string u; u = t; // copy assignment op. char* p = “No value semantics”; char* q = p; // p and q point to single data long long* llp = new long long( ); long long* llp2 = llp; delete llp; delete llp2; // double deletion catastrophic //1 42 Shallow copy vs. Deep copy ip //2 2. Pointers don’t have ownership management. int* ip = new int(42); // 1: ip owns the allocated memory // … ip = 0; // 2: assign something else to p: lose ownership ip Memory leak the variable ip not only points to, but also owns, the memory allocated for the integer object.

36 C-Style pointers problems cont.
3. The problem about “automatic” memory management. new and delete new [] and delete [] class MyClass { // … }; void f() { MyClass* p = new MyClass(); // memory allocation MyClass* pa = new MyClass[10]; delete p; // memory release delete [] pa; } 4. No exception safety Exception-safety: the notion that a program is structured so that throwing an exception doesn't cause unintended side effects. typical side-effect: Memory leak X* f() { X* p = new X; // do something // maybe throw an exception: memory leak return p; } RAII: Resource Acquisition is Initialization

37 Smart pointers: definitions
A smart pointer is a C++ class that mimics a regular pointer in syntax and some semantics, but it does more. Solution: Put raw pointers in a class and try to mimic their behaviors. p p 42 42 1 pp pp 42 1

38 Raw pointers vs. smart pointers
C-Style pointers  Raw pointers 1. Solution: Put raw pointers in a class and try to mimic their behaviors. // abbreviated and simplified template<class T> class std::auto_ptr { private: T* p; public: explicit auto_ptr(T* p_ = 0) : p(p_) {} auto_ptr& operator=(const auto_ptr& ap) { p = ap.p; ap.p = 0; return *this; } auto_ptr(auto_ptr& ap) : p(ap.p) { ap.p = 0; } ~auto_ptr() { delete p; } T& operator*() const { return *p; } T* operator->() const { return p; } }; C++98: auto_ptr 2. void client() { auto_ptr<float> ap(new float(3.14)); // 1 // use ap float f= *ap; auto_ptr<float> ap2 = ap; // 2 // no need to delete auto ptrs } // ap2 and ap are destroyed here //1 p 3.14 ap //2 p 3.14 Transfer ownership ap2 p ap

39 Resource management Almost every nontrivial applications controls some resource whose life-time is intermediate between the lifetime of an auto object, which exists only while the function that defines it is executing, and the lifetime of a global object, which exists as long as the program is running. Pete Becker. The C++ Standard Library Extensions: A Tutorial and Reference. Addison-Wesley, 2005. resource: memory, timer, network connection, database connection, lock, timer, … int g; // non-local (global) object, zero initialization void f() { int i = 0; int* ip = new int{0}; // … delete ip; } // release the memory allocated for i at the end of scope

40 Unique_ptr vs. C-Style pointers: Performance comparison
{ int* ip = new int{0}; // … delete ip; } #include <memory> { int* up = std::unique_ptr<int>{new int{0}}; // … }

41 Smart pointers in C++11 C++11 unique_ptr: Strict ownership
shared_ptr: Shared ownership weak_ptr: Shared ownership template<class T> class shared_ptr { T* p; long use_count; }; void test() { shared_ptr<int> p1(new int(42)); // count is 1 shared_ptr<int> p2(p1); // count is 2 shared_ptr<int> p3(p1); // count is 3 shared_ptr<int> p4; p4 = p3; // count is 4 cout << p1.use_count() << '\n'; // print 4 cout << (*p1) << '\n'; // print 42 // count goes back down to 2 } } // count goes back down to 1 } // here the count goes to 0 and the int is deleted.

42 Memory management in C++: 1985-2014
new & delete operators Pointer to member functions auto_ptr Memory management ? C++1y Programmer-controlled garbage collectors Garbage collected containers (string, vector, list, map, …) Smart pointers (shared_ptr, unique_ptr and weak_ptr) Commercial Garbage Collectors

43 Invitation to (re)learn C++
We are just at the golden era of C++. A lot of free, standard compliance and modern compilers GCC 4.9.0 Clang 3.4 Visual Studio 2012 (express edition) I invite you to learn/re-learn C++.

44 Know your discipline heroes/legendaries
If I have seen further it is by standing on the shoulders of giants. - Sir Isaac Newton Bjarne Stroustrup (Morgan-Stanley/Columbia university/TAMU) Bjarne Stroustrup. The C++ Programming Language. Addison-Wesley. 2013, 4th Edition. ISBN Bjarne Stroustrup. Programming- Principles and Practice Using C++. Addison-Wesley. ISBN A few other books and a lot of papers Alex Stepanov (A9.com) Alexander Stepanov and Paul McJones: Elements of Programming. Addison-Wesley Professional, 2009. A lot of papers

45 Know your discipline heroes/legendaries
Herb Sutter (Microsoft) Herb Sutter Exceptional C++ Style. Addison-Wesley, 2004, ISBN - and a few other books and a lot of papers. Andrew Koenig (Retired from AT&T Bell Lab) Andrew Koenig and Barbara Moo. Accelerated C++: Practical Programming by Example, Addison-Wesley, 2000. A lot of papers Scott Meyers (Software development consultant) Scott Meyers. Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library. Addison-Wesley, 2001. A lot of papers

46 Know your discipline heroes/legendaries
P. J. Plauger (Dinkamware) Howard Hinnant (Ripple) Google discussion groups: comp.lang.c++, comp.lang.c++.moderated The Standard Template Library, Prentice-Hall, 2001. Matt Austern (Google) Andrei Alexandrescu (Facebook) Modern C++ Design- Generic Programming and Design Patterns Applied.. Addison Wesley Longman, Reading, MA, 2001. A lot of papers Generic Programming and the STL: Using and Extending the C++ Standard Template Library. Addison Wesley Longman, Reading, MA, 1998. A lot of papers

47 References and further readings
International Organization for Standards. Latest publicly available ISO C++ draft Bjarne Stroustrup. C++11 FAQ. 2011, Bjarne Stroustrup. The C++ Programming Language. Addison-Wesley. ISBN th Edition, 2013. GoingNative 2012 & 2013 conference. The home of Standard C++ on the web — news, status and discussion about the C++ standard on all compilers and platforms. Bjarne Stroustrup. Programming- Principles and Practice Using C++. Addison-Wesley. ISBN Bjarne Stroustrup. The C++ Programming Language. Addison-Wesley, Reading, MA, special edition. Saeed Amrollahi. Modern Programming in New Millennium: A Technical Survey on Outstanding features of C++0x. Computer Report (Gozaresh-e Computer), No.199, November 2011 (Mehr and Aban 1390), pages (Persian)

48 & Q A Thanks for your patience …
Learning to ask the right (often hard) questions is an essential part of learning to think as a programmer. - Bjarne Stroustrup programming Principles and Practice Using C++, page 4. Thanks for your patience … Q A &


Download ppt "Modern C++ Programming: Current State and New Horizons"

Similar presentations


Ads by Google