SlideShare a Scribd company logo
1 of 16
Download to read offline
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
Why C++ Sails…
Image: http://tinyurl.com/nhyxnpv
…When the
Vasa Sank
Scott Meyers, Ph.D.
C++ in 1992
Standardization of a fledging language.
 Endless stream of extension proposals.
 Concern by standardization committee.
STL hadn’t yet been proposed.
Every extension proposal should be required to be accompanied
by a kidney. People would submit only serious proposals,
and nobody would submit more than two.
— Jim Waldo
C++ is already too large and complicated for our taste...
Remember the Vasa!
— Bjarne Stroustrup
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 2
Image: http://tinyurl.com/qdam8jm
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
The Vasa
 Commissioned 1625 by Swedish King Gustav.
 Much redesign during construction.
Ultimately designed to be flagship of royal navy.
 Heavily armed and decorated.
Image:tinyurl.com/9sgwa6w
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 3
The Vasa
Top-heavy and unstable, it sank
on its maiden voyage.
 Sailed less than a mile.
 Dozens died.
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 4
Image: tinyurl.com/bzpxqsj
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
C++: Heavily Armed
Classes (concrete and abstract) Namespaces Virtual member functions
Constructors and Destructors RTTI Nested classes
Default parameters Locales Nonvirtual functions
Operator overloading constexprs Static member functions
new and delete Bitwise operations Pure virtual functions
Lambda expressions Iostreams Function overloading
Inheritance (public, private, protected,
virtual, multiple)
Static data (in classes,
functions, namespaces, files)
Templates (including total and
partial specialization)
Nonvirtual member functions Inline functions Atomic data types
Exceptions/Exception Specifications References (Arguably 3 kinds) New Handlers
Private and protected members Friends Memory Models (3)
User-defined literals Raw and smart Pointers Promises and Futures
Type deduction (3 sets of rules) The STL Enums (2 kinds)
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 5
C++: Ornately Decorated
What is f in this code?
f(x); // “invoke f on x”
 Maybe a function (or function pointer or function reference).
 Maybe an instance of a class overloading operator().
 Maybe an object implicitly convertible to one of the above.
 Maybe an overloaded function name.
At any of multiple scopes.
 Maybe the name of one or more templates.
At any of multiple scopes.
 Maybe the name of one or more template specializations.
 Maybe several of the above!
E.g., overloaded function name + overloaded template name + name of template
specialization(s).
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 6
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
Too Complicated?
If you think C++ is not overly complicated, just what is a
“protected abstract virtual base pure virtual private destructor,”
and when was the last time you needed one?
— Tom Cargill (1990)
class Base {
private:
virtual ~Base() = 0;
};
class Derived: protected virtual Base { ... };
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 7
C++ Must have Done Something Right
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 8
Source: http://tinyurl.com/3xutoh
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
C++ Must have Done Something Right
Language use in active open source projects:
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 9
Source:http://tinyurl.com/q2f3jpu
Source:http://tinyurl.com/pwqzvmu
Change in past year:
Compatibility with
 Programmers:
Important in 1982.
Important now.
C longevity astonishing.
 Source code:
“As close as possible to C, but no closer.”
 Object code:
Direct access to universal assembly language.
 Build chains:
Editors, compilers, linkers, debuggers, etc.
C & C++ still often lumped together: “C/C++”.
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 10
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
Very General Features
Lead to surprising uses.
 Destructors.
RAII ⇒ general-purpose Undo.
Basis of all resource management.
Exception safety.
 Templates.
Generic programming (e.g., STL).
TMP.
Compile-time dimensional units analysis.
 Overloading.
Generic programming.
Smart pointers.
Function objects.
Basis for lambdas in C++11.
A language for library writers.
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 11
Image:tinyurl.com/awmleyr
Paradigm Agnosticism
 Procedural programming.
Free functions:
Basis of STL.
Naturally models symmetric relationships.
Facilitates natural type extension.
 OOP.
Including MI.
 Generic programming.
I tried to implement STL in other languages and failed.
C++ was the only language in which I could do it.
— Alexander Stepanov
 Functional programming.
Function objects (including closures).
TMP.
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 12
Image: tinyurl.com/awhpv75
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
Paradigm Agnosticism
 “Unsafe” programming.
Pointers, casts, unchecked arrays, etc.
“Trust the programmer.”
 “Safe” programming.
Vectors with bounds checking, checked iterators, etc.
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 13
Images: tinyurl.com/4kk6b5z and tinyurl.com/aeae4lm
Commitment to Systems Programming
Suitable for demanding systems applications.
 Program speed.
Many systems are never fast enough.
Some systems must conserve CPU cycles.
 Program size.
Static (including RTL).
Dynamic (i.e., image and working set size).
 Data layout.
Drivers.
Communications protocols.
Use with legacy code/systems.
 Efficient communication with outside
entities.
Hardware.
OSes.
Code in other languages.
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 14
Image: tinyurl.com/yhr7e95
Zero overhead principle:
 You don’t pay (at runtime) for what you don’t use.
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
Commitment to Systems Programming
Designed for wide platform availability.
 Microcontrollers to supercomputers.
Implementation-defined sizes for e.g., ints and pointers.
No assumptions about I/O capabilities.
 Hosted and unhosted.
No OS required.
C++ compilers available almost everywhere.
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 15
Images: http://tinyurl.com/nokq6to and http://tinyurl.com/p5qx5ah
C++ vs. The Vasa
So far, C++ has escaped the fate of the Vasa; it has not
keeled over and disappeared – despite much wishful
thinking and many dire predictions.
— Bjarne Stroustrup, 1996
Why?
 Compatibility with C.
 Very general features.
 Paradigm agnosticism.
 Commitment to systems programming.
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 16
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
Complexity Revisited
Consider again:
f(x); // “invoke f on x”
 f may be a function (or function pointer or function reference).
 f may be an instance of a class overloading operator().
 f may be an object implicitly convertible to one of the above.
 f may be an overloaded function name.
At any of multiple scopes.
 f may be the name of one or more templates.
At any of multiple scopes.
 f may be the name of one or more template specializations.
 f may be several of the above!
E.g., overloaded function name + overloaded template name + name of template
specialization(s).
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 17
Complexity Revisited
Is this really confusing?
std::cout << x; // call operator<<(std::cout, x)
operator<< is overloaded, templatized, and specialized.
 In multiple scopes.
Most C++ complexity hidden from most users most of the time.
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 18
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
Complex for Whom?
User view often pretty simple:
auto y = std::move(x); // request that x’s value be moved to y
Implementer view often more complex:
namespace std {
template<typename T>
typename remove_reference<T>::type&&
move(T&& param) noexcept
{
typedef remove_reference<T>::type&& ReturnType;
return static_cast<ReturnType>(param);
}
}
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 19
Destined for Complexity?
C++ most suited for demanding systems applications.
 Less demanding software ⇒ other languages suffice.
 You choose C++ ⇒ the situation is already complicated.
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 20
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
Or a Reflection of its Users?
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 21
Feature
Design Space
Sweet
Spot
A Language on the Move
C++ Standard evolving increasingly rapidly:
 ARM C++ (1990): 453 pages.
Includes explanatory annotations.
 C++98: 776 pages (71% bigger). Δt = 8 years
 C++11: 1353 pages (75% bigger). Δt = 13 years
 C++14: ~1370 pages (~1% bigger). Δt = 3 years
 C++17: Probably much bigger than C++14. Δt = 3 years
Bigger ≡ more complicated.
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 22
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
Simplification Through Added Complexity
New features often simplify common tasks:
std::vector<Widget> v;
for (std::vector<Widget>::const_iterator ci = v.begin(); // C++98
ci != v.end();
++ci) {
use ci (often *ci)
}
for (auto ci = v.cbegin(); ci != v.end(); ++ci) { // C++11
use ci (often *ci)
}
for (const auto cw& : v) { // C++11
use cw
}
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 23
Simplification Through Added Complexity
E.g., evolution of function object creation:
std::vector<int> v;
class InValueRange { // C++98
public:
InValueRange(int bottom, int top): b(bottom), t(top) {}
bool operator()(int val) const
{ return bottom <= val && val <= top; }
private:
int b, t;
};
std::vector<int>::iterator i = std::find_if(v.begin(), v.end(),
InValueRange(10, 20));
auto i = std::find_if(v.begin(), v.end(), // C++11
[](int val) { return 10 <= val && val <= 20; });
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 24
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
Simplification Through Added Complexity
struct ValidateAndFwd { // C++11
template<typename... Ts>
auto operator()(Ts&&... params) const ->
decltype(process(std::forward<Ts>(params)...))
{
validateCredentials();
return process(std::forward<Ts>(params)...);
}
};
auto f11 = ValidateAndFwd();
auto f14 = [](auto&&... params) -> decltype(auto) { // C++14
validateCredentials();
return process(std::forward<decltype(params)>(params)...);
};
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 25
Status of The Vasa and C++
Museum piece:
Preserved for Posterity
Living Language:
Still Growing and Maturing
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 26
Image:tinyurl.com/bksdcrg
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
Coda: Standard Self-Immolation
C++ Standard §14.7.3/7:
When writing a specialization,
be careful about its location;
or to make it compile
will be such a trial
as to kindle its self-immolation.
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 27
Further Information
 “Vasa (ship),” Wikipedia.
 “Why The Vasa Sank: 10 Problems and Some Antidotes for Software Projects,” Richard E.
Fairley and Mary Jane Willshire, IEEE Software, March/April 2003.
 “The Vasa: A Disaster Story with Sofware [sic] Analogies,” Linda Rising, The Software
Practitioner, January-February 2001.
 “How to write a C++ language extension proposal,” Bjarne Stroustrup, The C++ Report,
May 1992.
 “C++: The Making of a Standard Journey's End,” Chuck Allison, C/C++ Users Journal,
October 1996.
Primarily an interview with Bjarne Stroustrup.
 “TIOBE Programming Community Index,” TIOBE Software,
http://www.tiobe.com/index.php/content/paperinfo/tpci/.
 “Open Source Project Data,” Black Duck Open Source Resource Center,
http://www.blackducksoftware.com/oss/projects.
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 28
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
Further Information
 “Software Development for Infrastructure,” Bjarne Stroustrup, IEEE Computer, January
2012.
 “C/C++’s Enduring Popularity,” Coverity Software Integrity Blog, 22 February 2010.
 “Why C++,” Kyle Wilson, GameArchitect.net, 15 July 2006.
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 29
Licensing Information
Scott Meyers licenses materials for this and other training courses for commercial or personal
use. Details:
 Commercial use: http://aristeia.com/Licensing/licensing.html
 Personal use: http://aristeia.com/Licensing/personalUse.html
Courses currently available for personal use include:
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 30
Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved.
http://www.aristeia.com/
Why C++ Sails When the Vasa Sank
About Scott Meyers
Scott Meyers is one of the world’s foremost authorities
on C++. His web site,
http://aristeia.com/
provides information on:
 Technical training services
 Upcoming presentations
 Books, articles, online videos, etc.
 Professional activities blog
Scott Meyers, Software Development Consultant
http://www.aristeia.com/
© 2013 Scott Meyers, all rights reserved.
Slide 31

More Related Content

Similar to Scott Meyers — Why C++ Sails When the Vasa Sank

Lunch and learn as3_frameworks
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworksYuri Visser
 
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingDDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingJaime Martin Losa
 
Forensic Memory Analysis of Android's Dalvik Virtual Machine
Forensic Memory Analysis of Android's Dalvik Virtual MachineForensic Memory Analysis of Android's Dalvik Virtual Machine
Forensic Memory Analysis of Android's Dalvik Virtual MachineSource Conference
 
Uniface 9.7 en PostgreSQL
Uniface 9.7 en PostgreSQLUniface 9.7 en PostgreSQL
Uniface 9.7 en PostgreSQLArjen van Vliet
 
MvvmCross Introduction
MvvmCross IntroductionMvvmCross Introduction
MvvmCross IntroductionStuart Lodge
 
MvvmCross Seminar
MvvmCross SeminarMvvmCross Seminar
MvvmCross SeminarXamarin
 
Microsoft, java and you!
Microsoft, java and you!Microsoft, java and you!
Microsoft, java and you!George Adams
 
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdf
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdfEN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdf
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdfGiorgiRcheulishvili
 
Documentum Spring Data
Documentum Spring DataDocumentum Spring Data
Documentum Spring DataMichael Mohen
 
ArcReady - Architecting For The Cloud
ArcReady - Architecting For The CloudArcReady - Architecting For The Cloud
ArcReady - Architecting For The CloudMicrosoft ArcReady
 
Realizing the Promise of Portable Data Processing with Apache Beam
Realizing the Promise of Portable Data Processing with Apache BeamRealizing the Promise of Portable Data Processing with Apache Beam
Realizing the Promise of Portable Data Processing with Apache BeamDataWorks Summit
 
State of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to comeState of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to comeKonrad Malawski
 
Mark Hughes Annual Seminar Presentation on Open Source
Mark Hughes Annual Seminar Presentation on Open Source Mark Hughes Annual Seminar Presentation on Open Source
Mark Hughes Annual Seminar Presentation on Open Source Tracy Kent
 
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...Codemotion
 
EWD 3 Training Course Part 17: Introduction to Global Storage Databases
EWD 3 Training Course Part 17: Introduction to Global Storage DatabasesEWD 3 Training Course Part 17: Introduction to Global Storage Databases
EWD 3 Training Course Part 17: Introduction to Global Storage DatabasesRob Tweed
 

Similar to Scott Meyers — Why C++ Sails When the Vasa Sank (20)

Lunch and learn as3_frameworks
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworks
 
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingDDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
 
Scaling 101 test
Scaling 101 testScaling 101 test
Scaling 101 test
 
Scaling 101
Scaling 101Scaling 101
Scaling 101
 
Forensic Memory Analysis of Android's Dalvik Virtual Machine
Forensic Memory Analysis of Android's Dalvik Virtual MachineForensic Memory Analysis of Android's Dalvik Virtual Machine
Forensic Memory Analysis of Android's Dalvik Virtual Machine
 
The Future of Cloud Innovation, featuring Adrian Cockcroft
The Future of Cloud Innovation, featuring Adrian CockcroftThe Future of Cloud Innovation, featuring Adrian Cockcroft
The Future of Cloud Innovation, featuring Adrian Cockcroft
 
Uniface 9.7 en PostgreSQL
Uniface 9.7 en PostgreSQLUniface 9.7 en PostgreSQL
Uniface 9.7 en PostgreSQL
 
MvvmCross Introduction
MvvmCross IntroductionMvvmCross Introduction
MvvmCross Introduction
 
MvvmCross Seminar
MvvmCross SeminarMvvmCross Seminar
MvvmCross Seminar
 
Microsoft, java and you!
Microsoft, java and you!Microsoft, java and you!
Microsoft, java and you!
 
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdf
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdfEN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdf
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdf
 
Documentum Spring Data
Documentum Spring DataDocumentum Spring Data
Documentum Spring Data
 
ArcReady - Architecting For The Cloud
ArcReady - Architecting For The CloudArcReady - Architecting For The Cloud
ArcReady - Architecting For The Cloud
 
Realizing the Promise of Portable Data Processing with Apache Beam
Realizing the Promise of Portable Data Processing with Apache BeamRealizing the Promise of Portable Data Processing with Apache Beam
Realizing the Promise of Portable Data Processing with Apache Beam
 
Sql and Go
Sql and GoSql and Go
Sql and Go
 
State of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to comeState of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to come
 
Mark Hughes Annual Seminar Presentation on Open Source
Mark Hughes Annual Seminar Presentation on Open Source Mark Hughes Annual Seminar Presentation on Open Source
Mark Hughes Annual Seminar Presentation on Open Source
 
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
 
Squeak
SqueakSqueak
Squeak
 
EWD 3 Training Course Part 17: Introduction to Global Storage Databases
EWD 3 Training Course Part 17: Introduction to Global Storage DatabasesEWD 3 Training Course Part 17: Introduction to Global Storage Databases
EWD 3 Training Course Part 17: Introduction to Global Storage Databases
 

More from Yandex

Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...Yandex
 
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров ЯндексаСтруктурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров ЯндексаYandex
 
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров ЯндексаПредставление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров ЯндексаYandex
 
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...Yandex
 
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...Yandex
 
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...Yandex
 
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...Yandex
 
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...Yandex
 
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...Yandex
 
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...Yandex
 
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...Yandex
 
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеровКак защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеровYandex
 
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...Yandex
 
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...Yandex
 
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...Yandex
 
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...Yandex
 
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...Yandex
 
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...Yandex
 
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...Yandex
 
Эталонное описание фильма на основе десятков дубликатов
Эталонное описание фильма на основе десятков дубликатовЭталонное описание фильма на основе десятков дубликатов
Эталонное описание фильма на основе десятков дубликатовYandex
 

More from Yandex (20)

Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
 
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров ЯндексаСтруктурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
 
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров ЯндексаПредставление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
 
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
 
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
 
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
 
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
 
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
 
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
 
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
 
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
 
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеровКак защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
 
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
 
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
 
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
 
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
 
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
 
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
 
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
 
Эталонное описание фильма на основе десятков дубликатов
Эталонное описание фильма на основе десятков дубликатовЭталонное описание фильма на основе десятков дубликатов
Эталонное описание фильма на основе десятков дубликатов
 

Recently uploaded

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Recently uploaded (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

Scott Meyers — Why C++ Sails When the Vasa Sank

  • 1. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank Why C++ Sails… Image: http://tinyurl.com/nhyxnpv …When the Vasa Sank Scott Meyers, Ph.D. C++ in 1992 Standardization of a fledging language.  Endless stream of extension proposals.  Concern by standardization committee. STL hadn’t yet been proposed. Every extension proposal should be required to be accompanied by a kidney. People would submit only serious proposals, and nobody would submit more than two. — Jim Waldo C++ is already too large and complicated for our taste... Remember the Vasa! — Bjarne Stroustrup Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 2 Image: http://tinyurl.com/qdam8jm
  • 2. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank The Vasa  Commissioned 1625 by Swedish King Gustav.  Much redesign during construction. Ultimately designed to be flagship of royal navy.  Heavily armed and decorated. Image:tinyurl.com/9sgwa6w Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 3 The Vasa Top-heavy and unstable, it sank on its maiden voyage.  Sailed less than a mile.  Dozens died. Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 4 Image: tinyurl.com/bzpxqsj
  • 3. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank C++: Heavily Armed Classes (concrete and abstract) Namespaces Virtual member functions Constructors and Destructors RTTI Nested classes Default parameters Locales Nonvirtual functions Operator overloading constexprs Static member functions new and delete Bitwise operations Pure virtual functions Lambda expressions Iostreams Function overloading Inheritance (public, private, protected, virtual, multiple) Static data (in classes, functions, namespaces, files) Templates (including total and partial specialization) Nonvirtual member functions Inline functions Atomic data types Exceptions/Exception Specifications References (Arguably 3 kinds) New Handlers Private and protected members Friends Memory Models (3) User-defined literals Raw and smart Pointers Promises and Futures Type deduction (3 sets of rules) The STL Enums (2 kinds) Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 5 C++: Ornately Decorated What is f in this code? f(x); // “invoke f on x”  Maybe a function (or function pointer or function reference).  Maybe an instance of a class overloading operator().  Maybe an object implicitly convertible to one of the above.  Maybe an overloaded function name. At any of multiple scopes.  Maybe the name of one or more templates. At any of multiple scopes.  Maybe the name of one or more template specializations.  Maybe several of the above! E.g., overloaded function name + overloaded template name + name of template specialization(s). Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 6
  • 4. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank Too Complicated? If you think C++ is not overly complicated, just what is a “protected abstract virtual base pure virtual private destructor,” and when was the last time you needed one? — Tom Cargill (1990) class Base { private: virtual ~Base() = 0; }; class Derived: protected virtual Base { ... }; Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 7 C++ Must have Done Something Right Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 8 Source: http://tinyurl.com/3xutoh
  • 5. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank C++ Must have Done Something Right Language use in active open source projects: Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 9 Source:http://tinyurl.com/q2f3jpu Source:http://tinyurl.com/pwqzvmu Change in past year: Compatibility with  Programmers: Important in 1982. Important now. C longevity astonishing.  Source code: “As close as possible to C, but no closer.”  Object code: Direct access to universal assembly language.  Build chains: Editors, compilers, linkers, debuggers, etc. C & C++ still often lumped together: “C/C++”. Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 10
  • 6. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank Very General Features Lead to surprising uses.  Destructors. RAII ⇒ general-purpose Undo. Basis of all resource management. Exception safety.  Templates. Generic programming (e.g., STL). TMP. Compile-time dimensional units analysis.  Overloading. Generic programming. Smart pointers. Function objects. Basis for lambdas in C++11. A language for library writers. Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 11 Image:tinyurl.com/awmleyr Paradigm Agnosticism  Procedural programming. Free functions: Basis of STL. Naturally models symmetric relationships. Facilitates natural type extension.  OOP. Including MI.  Generic programming. I tried to implement STL in other languages and failed. C++ was the only language in which I could do it. — Alexander Stepanov  Functional programming. Function objects (including closures). TMP. Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 12 Image: tinyurl.com/awhpv75
  • 7. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank Paradigm Agnosticism  “Unsafe” programming. Pointers, casts, unchecked arrays, etc. “Trust the programmer.”  “Safe” programming. Vectors with bounds checking, checked iterators, etc. Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 13 Images: tinyurl.com/4kk6b5z and tinyurl.com/aeae4lm Commitment to Systems Programming Suitable for demanding systems applications.  Program speed. Many systems are never fast enough. Some systems must conserve CPU cycles.  Program size. Static (including RTL). Dynamic (i.e., image and working set size).  Data layout. Drivers. Communications protocols. Use with legacy code/systems.  Efficient communication with outside entities. Hardware. OSes. Code in other languages. Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 14 Image: tinyurl.com/yhr7e95 Zero overhead principle:  You don’t pay (at runtime) for what you don’t use.
  • 8. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank Commitment to Systems Programming Designed for wide platform availability.  Microcontrollers to supercomputers. Implementation-defined sizes for e.g., ints and pointers. No assumptions about I/O capabilities.  Hosted and unhosted. No OS required. C++ compilers available almost everywhere. Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 15 Images: http://tinyurl.com/nokq6to and http://tinyurl.com/p5qx5ah C++ vs. The Vasa So far, C++ has escaped the fate of the Vasa; it has not keeled over and disappeared – despite much wishful thinking and many dire predictions. — Bjarne Stroustrup, 1996 Why?  Compatibility with C.  Very general features.  Paradigm agnosticism.  Commitment to systems programming. Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 16
  • 9. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank Complexity Revisited Consider again: f(x); // “invoke f on x”  f may be a function (or function pointer or function reference).  f may be an instance of a class overloading operator().  f may be an object implicitly convertible to one of the above.  f may be an overloaded function name. At any of multiple scopes.  f may be the name of one or more templates. At any of multiple scopes.  f may be the name of one or more template specializations.  f may be several of the above! E.g., overloaded function name + overloaded template name + name of template specialization(s). Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 17 Complexity Revisited Is this really confusing? std::cout << x; // call operator<<(std::cout, x) operator<< is overloaded, templatized, and specialized.  In multiple scopes. Most C++ complexity hidden from most users most of the time. Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 18
  • 10. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank Complex for Whom? User view often pretty simple: auto y = std::move(x); // request that x’s value be moved to y Implementer view often more complex: namespace std { template<typename T> typename remove_reference<T>::type&& move(T&& param) noexcept { typedef remove_reference<T>::type&& ReturnType; return static_cast<ReturnType>(param); } } Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 19 Destined for Complexity? C++ most suited for demanding systems applications.  Less demanding software ⇒ other languages suffice.  You choose C++ ⇒ the situation is already complicated. Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 20
  • 11. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank Or a Reflection of its Users? Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 21 Feature Design Space Sweet Spot A Language on the Move C++ Standard evolving increasingly rapidly:  ARM C++ (1990): 453 pages. Includes explanatory annotations.  C++98: 776 pages (71% bigger). Δt = 8 years  C++11: 1353 pages (75% bigger). Δt = 13 years  C++14: ~1370 pages (~1% bigger). Δt = 3 years  C++17: Probably much bigger than C++14. Δt = 3 years Bigger ≡ more complicated. Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 22
  • 12. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank Simplification Through Added Complexity New features often simplify common tasks: std::vector<Widget> v; for (std::vector<Widget>::const_iterator ci = v.begin(); // C++98 ci != v.end(); ++ci) { use ci (often *ci) } for (auto ci = v.cbegin(); ci != v.end(); ++ci) { // C++11 use ci (often *ci) } for (const auto cw& : v) { // C++11 use cw } Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 23 Simplification Through Added Complexity E.g., evolution of function object creation: std::vector<int> v; class InValueRange { // C++98 public: InValueRange(int bottom, int top): b(bottom), t(top) {} bool operator()(int val) const { return bottom <= val && val <= top; } private: int b, t; }; std::vector<int>::iterator i = std::find_if(v.begin(), v.end(), InValueRange(10, 20)); auto i = std::find_if(v.begin(), v.end(), // C++11 [](int val) { return 10 <= val && val <= 20; }); Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 24
  • 13. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank Simplification Through Added Complexity struct ValidateAndFwd { // C++11 template<typename... Ts> auto operator()(Ts&&... params) const -> decltype(process(std::forward<Ts>(params)...)) { validateCredentials(); return process(std::forward<Ts>(params)...); } }; auto f11 = ValidateAndFwd(); auto f14 = [](auto&&... params) -> decltype(auto) { // C++14 validateCredentials(); return process(std::forward<decltype(params)>(params)...); }; Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 25 Status of The Vasa and C++ Museum piece: Preserved for Posterity Living Language: Still Growing and Maturing Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 26 Image:tinyurl.com/bksdcrg
  • 14. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank Coda: Standard Self-Immolation C++ Standard §14.7.3/7: When writing a specialization, be careful about its location; or to make it compile will be such a trial as to kindle its self-immolation. Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 27 Further Information  “Vasa (ship),” Wikipedia.  “Why The Vasa Sank: 10 Problems and Some Antidotes for Software Projects,” Richard E. Fairley and Mary Jane Willshire, IEEE Software, March/April 2003.  “The Vasa: A Disaster Story with Sofware [sic] Analogies,” Linda Rising, The Software Practitioner, January-February 2001.  “How to write a C++ language extension proposal,” Bjarne Stroustrup, The C++ Report, May 1992.  “C++: The Making of a Standard Journey's End,” Chuck Allison, C/C++ Users Journal, October 1996. Primarily an interview with Bjarne Stroustrup.  “TIOBE Programming Community Index,” TIOBE Software, http://www.tiobe.com/index.php/content/paperinfo/tpci/.  “Open Source Project Data,” Black Duck Open Source Resource Center, http://www.blackducksoftware.com/oss/projects. Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 28
  • 15. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank Further Information  “Software Development for Infrastructure,” Bjarne Stroustrup, IEEE Computer, January 2012.  “C/C++’s Enduring Popularity,” Coverity Software Integrity Blog, 22 February 2010.  “Why C++,” Kyle Wilson, GameArchitect.net, 15 July 2006. Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 29 Licensing Information Scott Meyers licenses materials for this and other training courses for commercial or personal use. Details:  Commercial use: http://aristeia.com/Licensing/licensing.html  Personal use: http://aristeia.com/Licensing/personalUse.html Courses currently available for personal use include: Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 30
  • 16. Scott Meyers, Software Development Consultant © 2013 Scott Meyers, all rights reserved. http://www.aristeia.com/ Why C++ Sails When the Vasa Sank About Scott Meyers Scott Meyers is one of the world’s foremost authorities on C++. His web site, http://aristeia.com/ provides information on:  Technical training services  Upcoming presentations  Books, articles, online videos, etc.  Professional activities blog Scott Meyers, Software Development Consultant http://www.aristeia.com/ © 2013 Scott Meyers, all rights reserved. Slide 31