Show Lecture.Standards as a slide show.
CS253 Standards
Preferences
- Which is better, Java or C++?
Dialects
- In this class, we’re learning C++, not g++.
- g++ is a particular implementation of C++.
- There are other C++ compilers: clang, Microsoft Visual Studio, etc.
- Similarly, there are many dialects of English, Spanish, French, etc.
Standards
- So, what is C++, then?
- How do we tell what’s real C++ and what’s a dialect?
- Let’s try some simpler questions:
- Who’s the best pop singer? Beyoncé
- When is the holiday Washington's Birthday? third Monday in February
- Is Pluto a planet? no
- Says who? International Astronomical Union
- How long is a meter? 1/299792458 light-second
- Says who? International Standards Organization
Standard C++
- C++ is defined by ISO, the International Organization for Standardization
(?), and its national member organizations such as ANSI,
the American National Standards Institute.
- There are several versions of the C++ standard:
1998, 2003, 2011, 2014, 2017.
- This class focuses on C++ 2014 (alias C++14).
- I’ll let you get away with anything that
g++
permits, however.
- g++ implements extensions to the C++ standards.
Standard
An HP co-worker, Donn Terry, used to say “Standard is better than better”.
As I understand it, this meant that doing something in the standard
way is superior to doing it in a non-standard way, even if the non-standard
way yields better results. True enough, as far as it goes.
I want you to learn standard C++. That way, your programs will
work everywhere, on any standard-conforming compiler.
If you use compiler extensions, non-standard features, then your
program will work on that particular compiler, but perhaps
not on others. Not so good.