Quick Q: Why are override and final identifiers with special meaning instead of reserved keywords?

Quick A: To avoid breaking old code, thanks to context-sensitive keywords.

Recently on SO:

Why are override and final identifiers with special meaning instead of reserved keywords?

Both the override specifier and final specifier were added in C++11. They differ from other specifiers added to C++11 such as constexpr and decltype, in that they are not keywords and so are available for use as identifiers:

int main()
{
  int override = 0 ;    // Ok
  int final = 0 ;       // Ok
  //int constexpr = 0 ; // Error
}

They are referred to as identifiers with special meaning, which is covered in the draft C++11 standard section 2.11 [lex.name] (emphasis mine):

The identifiers in Table 3 have a special meaning when appearing in a certain context. When referred to in the grammar, these identifiers are used explicitly rather than using the identifier grammar production. any ambiguity as to whether a given identifier has a special meaning is resolved to interpret the token as a regular identifier.
and Table 3 -- Identifiers with special meaning lists both override and final.

Why did these two specifiers end up being identifiers with special meaning instead of keywords?

New C++ experimental feature: The tadpole operators--Raymond Chen

You should read about this amazing new feature:

New C++ experimental feature: The tadpole operators

by Raymond Chen

From the article:

How often have you had to write code like this:

x = (y + 1) % 10;
x = (y + 1) * (z - 1);
x = (wcslen(s) + 1) * sizeof(wchar_t);

Since the + and - operators have such low precedence, you end up having to parenthesize them a lot, which can lead to heavily nested code that is hard to read...

Once you have been thoroughly amazed, you should also read this article:

The tadpole operators explained

Cling Aims to Provide a High-performance C++ REPL--Sergio De Simone

Read about a REPL allowing to test things rapidly in C++:

Cling Aims to Provide a High-performance C++ REPL

by Sergio De Simone

From the article:

Cling is an interactive C++ interpreter that is built on top of LLVM and Clang and promises to provide a leap in productivity by going beyond the usual code-compile-run-debug C++ workflow...

Other useful materials:

CppCast Episode 13: Testdriven C++ using Catch with Phil Nash

Episode 13 of CppCast the only podcast by C++ developers for C++ developers. In this episode Rob and Jason are joined by Phil Nash to talk about C++ Unit Testing with Catch.

CppCast Episode 13: Testdriven C++ using Catch with Phil Nash

by Rob Irving and Jason Turner

About the interviewee:

Phil is a semi-independent software developer, coach and consultant - working in as diverse fields as finance, agile coaching and iOS development. A long time C++ developer he also has his feet in C#, F#, Objective-C and Swift - as well as dabbling in other languages. He is the author of several open source projects - most notably Catch: a C++-native test framework.

Boost Your Productivity with Modern C++ -- June 8-12 (German), June 22-26 (English)

gottschling-seminar.PNGEarly-bird registration ends on Friday:

Boost Your Productivity with Modern C++

Leipzig, Germany

June 8-12, 2015 (German)

June 22-26, 2015 (English)

From the announcement:

Do you develop your developers?

Only when the last programmer is gone to Silicon Valley, we will realize that the digital progress won’t wait for us.

Google, Facebook, Amazon are clear examples showing that the growth of the IT market is passing by Germany. Over here, the formation of IT experts is systematically neglected. The industry is held back by the shortage of skilled programmers. Though we cannot create new developers for you, we can lift YOUR developers to the next level.

Yet in times of Big Data and Industry 4.0 the popularity of C++ remains unaffected, especially for operating systems, compilers and embedded systems. The revolutionary improvements in C++11 and C++14 brought the language further into the center of attention. For C++17, we are expecting even more spectacular progress.

Our practical training is based on the exclusive material from our tutor’s yet unpublished book on this powerful language.

The training is not a dull walk through all features of C++ but an inspiration how they can be applied with maximal efficacy. The programming language offers a wide variety of possibilities to create your own abstractions -- up to building your own embedded domain-specific language. Thereby, C++ is the only programming language allowing for such powerful abstractions while gaining maximal performance. Good C++ programming decreases the risk of errors and increases the programs' robustness. In addition, your programs will be even clearer, easier, and more attractive to your co-workers -- thus, more readable and maintainable.

Interactive exercises with practical relevance combine theory with your everyday business. We offer an intensive training in small groups with up to 10 participants in German or English. It is designed for software developers who want to develop high quality programs characterized by intuitive interfaces and maximum performance. At the end of the training, a certificate for each participants will be issued.

Trainer: Dr. Peter Gottschling is the author of the Matrix Template Library 4, co-author of Boost Graph Library as well as various other libraries. He was Head of the German delegation to the ISO Committee for the standardization of C++ and is Vice Chairman of the DIN Committee for programming languages. He has taught C++ at the Technische Universität Dresden, Technische Universität Berlin and Indiana University. Today, he is the CEO of SimuNova while working on his book "Discovering Modern C++" that will be released later this year.

C++17 Fold Expressions--Baptiste Wicht

You should read that if you want to know more about this exciting future feature of C++:

C++17 Fold Expressions

by Baptiste Wicht

From the article:

C++11 introduced variadic template to the languages. This new feature allows to write template functions and classes taking an arbitrary number of template parameters. This a feature I really like and I already used it quite a lot in my different libraries. Here is a very simple example computing the sum of the parameters:

// Good with variadics
auto old_sum(){
    return 0;
}

template<typename T1, typename... T>
auto old_sum(T1 s, T... ts){
    return s + old_sum(ts...);;
} 

// Better with fold expressions
template<typename... T>
auto fold_sum_1(T... s){
    return (... + s);
}x

Mach7: Pattern Matching for C++

Here is a new library to perform pattern matching:

Mach7: Pattern Matching for C++

by Yuriy Solodkyy, Gabriel Dos Reis and Bjarne Stroustrup

From the article:

Pattern matching is an abstraction mechanism that can greatly simplify source code. Commonly, pattern matching is built into a language to provide better syntax, faster code, correctness guarantees and improved diagnostics. Mach7 is a library solution to pattern matching in C++ that maintains many of these features. All the patterns in Mach7 are user-definable, can be stored in variables, passed among functions, and allow the use of open class hierarchies...

Example:

// Fibonacci numbers
int fib(int n)
{
    var<int> m;

    Match(n)
    {
      Case(1)     return 1;
      Case(2)     return 1;
      Case(2*m)   return sqr(fib(m+1)) - sqr(fib(m-1));
      Case(2*m+1) return sqr(fib(m+1)) + sqr(fib(m));
    }
    EndMatch
}

CppCon 2014 Microsoft w/ C++ to Deliver Office Across Different Platforms, Part I--Zaika Antoun

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

Microsoft w/ C++ to Deliver Office Across Different Platforms, Part I

by Zaika Antoun

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

What does it take to target multiple major mobile devices (as well as traditional environments) with portable, efficient, single-source code? This talk demonstrates architectures, techniques, and lessons learned rooted in actual experience with using C++ to deliver several major cross-platform projects across iOS, Android, Windows, and Mac: Microsoft Office (Word, Excel, PowerPoint, OneNote) and the SQL Server PowerBI. Each presents a different case study: For example, Office already used C++, whereas PowerBI was originally written in Silverlight and then rewritten in C++; Office is a set of user-facing apps, whereas PowerBI is a system component. Although some of these are demanding first-tier “Cadillac” applications, we expect this experience to be a model for the future as more and more apps fall into this category and use C++ to target many popular platforms from (mostly) a single source base. This talk will cover the following key topics and tradeoffs: Rich vs. reach, including access to latest OS features (e.g., iOS 8 additions) and hardware features (e.g., vector units, GPUs). Consistency of functionality. Client code vs. server/service web code. Sharing vs. quality, including dialing appropriately between more shared code and high quality code. Drawing the line between the bulk of C++ code and interfacing with non-C++ for UX and PALs (platform adaptation/abstraction layers) for target-specific user interface and system services. Architecting PALs, including why “mini-PALs” rather than an “über-PAL.” Forces “doing the right thing” and good architecture with composable components. How C++ enables things not feasible using other technologies. Velocity and enabling faster cross-platform development and deployment. Cost of maintenance, including time, size, and complexity (both breadth and depth). And, last but not least, developing in a single modern C++ source base built with different evolving C++ compilers, including VC++ and Clang/LLVM.

CppCon 2015 registration opened today

cppcon-117.PNGRegistration is now open for the C++ event of 2015! Announced today at cppcon.org:

CppCon 2015 Registration Open

CppCon 2015: September 21-25, 2015 = 5 days x ~6 tracks

Pre-conference C++11/14 boot camp: September 19-20, 2015

Like last year, registration is being kept affordable -- Early Bird is $845 for the entire week-long event, and student registrations will also be available. In addition, this year there's also an optional "pre-conference C++11/14 boot camp" class for people who are newer to modern C++ and want extra training to get up to speed for two solid days before CppCon itself begins so they can get the most out of the week-long event.

From the announcement:

Registration is now open for CppCon 2015 to be held September 20-25, 2015 at the Meydenbauer Center in Bellevue, Washington, USA. The conference will start with the keynote by Bjarne Stroustrup titled “Writing Good C++14”.

CppCon is the annual, week-long face-to-face gathering for the entire C++ community. The conference is organized by the C++ community for the community. You will enjoy inspirational talks and a friendly atmosphere designed to help attendees learn from each other, meet interesting people, and generally have a stimulating experience. Taking place this year in the beautiful Seattle neighborhood and including multiple diverse tracks, the conference will appeal to anyone from C++ novices to experts.

What you can expect at CppCon:

  • “Modernize Your C++” New this year! An optional two day class for getting up to speed with C++11/14.
  • Invited talks and panels: The CppCon keynote by Bjarne Stroustrup will start off a week full of insight from some of the world’s leading experts in C++. Still have questions? Ask them at one of CppCon’s panels featuring those at the cutting edge of the language.
  • Presentations by the C++ community: What do embedded systems, game development, high frequency trading, and particle accelerators have in common? C++, of course! Expect talks from a broad range of domains experts focused on practical C++ techniques, libraries, and tools.
  • Lightning talks: Get informed at a fast pace during special sessions of short, less formal talks. Never presented at a conference before? This is your chance to share your thoughts on a C++-related topic in an informal setting.
  • Evening events and “unconference” time: Relax, socialize, or start an impromptu coding session.

CppCon’s goal is to encourage the best use of C++ while preserving the diversity of viewpoints and experiences. The conference is a project of the Standard C++ Foundation, a not-for-profit organization whose purpose is to support the C++ software developer community and promote the understanding and use of modern, standard C++ on all compilers and platforms.

If you're interested in C++, be sure to attend CppCon this September. Early Bird registration is open until July 10.

If you missed last year's CppCon and want to get a taste of what it was like, from the world-class content to the festival atmosphere, just check out the 2014 videos under the "program" tab at cppcon.org.