2010: Cyberpunk World

Speaking as a neutral observer with exactly zero opinion on any political question, and not even a cyberpunk reader given that I’ve read about two such novels in my life: Is it just me, or do the last few months’ global news headlines read like they were ghostwritten by Neal Stephenson?

I wonder if we may look back on 2010 as the year it became widely understood that we now live in a cyberpunk world. Many of 2010’s top stories read like sci-fi:

  • Stuxnet: Sovereign nations (apparently) carry out successful attacks on each other with surgically crafted malware — viruses and worms that target specific nuclear facilities, possibly causing more damage and delay to their targets’ weapons programs than might have been achieved with a conventional military strike.
  • Wikileaks: Stateless ‘Net organizations operating outside national laws fight information battles with major governments, up to and including the strongest industrial and military superpowers. The governments react by applying political pressure to powerful multinational corporations to try to force the stateless organizations off the ‘Net and cut off their support and funding, but these efforts succeed only temporarily as the target keeps moving and reappearing.
  • Anonymous: Small vigilante groups of private cybergunners retaliate by (or just latch onto a handy excuse to go) carrying out global attacks on the websites of multinational corporations, inflicting enough damage on Visa and Mastercard to temporarily take them off the ‘Net, while being repelled by cyberfortresses like Amazon and Paypal that have stronger digital defenses. But before we get too confident about Amazon’s strength, remember that this definitely ain’t the biggest attack they’ll ever see, just a 21st-century-cyberwar hors d’oeuvre: Who were these global attackers? About 100 people, many of them teenagers.
  • Assange: Charismatic cyberpersonalities operating principally on the ‘Net live as permanent residents of no nation, and roam the world (until arrested) wherever they can jack in, amid calls for their arrest and/or assassination.
  • Kinect: Your benevolent (you hope) living room game console can see you. Insert obligatory Minority Report UIs no longer sci-fi line here, with optional reference to Nineteen Eighty-Four.
  • Other: Never mind that organized crime has for years now been well-known to be behind much of the phishing, spam, card skimming, and other electronic and ‘Net crimes. Not new to 2010, but seeing a significant uptick in the continued transition from boutique crime to serious organization and spear-phishing targeting specific high-profile organizations including the U.S. military.

Over the coming months and years, it will be interesting to see how multinational corporations and sovereign governments react to what some of them no doubt view as a new stateless — transnational? extranational? supernational? — and therefore global threat to their normal way of doing business.

Trip Report: November 2010 C++ Standards Meeting

The fall 2010 ISO C++ meeting was held on November 8-13 in Batavia, IL, USA. The post-meeting mailing is now live, including meeting minutes and other information.

I attended this meeting virtually, as I was still recovering from some shoulder surgery. Fermilab’s teleconference facilities are excellent — I think it’s safe to say they’re the best I’ve ever used, and it was very helpful for several of us telecommuters to participate actively in the key design discussions below.

Where are we in the process?

For this and the next meeting (Madrid in March), the committee is doing ballot resolution and dealing with national body comments. Because we issued a Final Committee Draft, ISO C++0x can officially no longer add new features. All that we can do is address national body comments, and make any other bug fixes we find.

Things are going well and we are on track to complete the Final Draft International Standard (FDIS) for the C++0x standard after the Madrid meeting in March. If that happens and that ballot succeeds, the C++0x standard will be published in 2011. If it turns out we need another meeting to be able to handle the last of the comment tail, the fallback will be to target FDIS at the following meeting (Indiana in August).

For about five years now we’ve been having three six-day meetings a year, besides smaller unofficial subgroup meetings in person or by teleconference in between official meetings. Because things are going well, we also decided to scale back to two five-day meetings a year starting in 2011, which is what we had after C++98 shipped until work on C++0x began in earnest.

Key design decisions at this meeting

Note: For the first item, I’ll repeat much of the text from the August meeting trip report to make this a standalone post.

Attributes: alignment, noreturn, and virtual control. As reported in the previous trip report, my personal hot button for these past two meetings was that C++0x syntax for override control in particular not look like the following example:

class [[base_check]] Derived : public Base {
  virtual void f [[override]] ();
  virtual double g [[final]] ( int );
  virtual void h [[hiding]] ();

The committee has now decided replace these attributes with keywords. The two main options for keywords were:

  • fully reserved words, which can break existing user code that uses the words as variable or type names and so would mean we need to pick uglier names; and
  • contextual keywords as done in C++/CLI, which does not break existing user code and so lets us pick the ideal nice names, but which would be the first contextual keywords in ISO C++ (and there’s always resistance to being the first).

It was decided to follow the latter — contextual keywords pretty much as used in C++/CLI, down to renaming [[hiding]] as new. Here’s the paper with the wording changes, and here’s how the above example now looks:

class Derived explicit : public Base {
  virtual void f () override;
  virtual double g( int ) final;
  virtual void h() new;

The other two kinds of attributes that we considered changing to keywords were [[align]] to specify the alignment of a type, and [[noreturn]] to specify that a function never return. The committee confirmed the decision reported as tentative in the previous trip report, namely to change [[align]] to a keyword and leave [[noreturn]] alone.

With these changes, the only two standard attributes are [[noreturn]] and [[carries_dependency]].

noexcept, part 1: Destructor and delete operators noexcept by default. This tentative resolution from Rapperswil was mostly adopted. Briefly, every destructor will be noexcept by default unless a member or base destructor is noexcept(false); you can of course still explicitly override the default and write noexcept(false) on any destructor. This means that the vast majority of classes should be noexcept. The papers containing the exact wording changes are here (destructors) and here (delete operators). For detailed rationale and ranting about why this is a Good Thing, see the previous trip report.

noexcept, part 2: noexcept now partly applied to the standard library. We also passed the first set of papers to apply noexcept to the standard library, including changing functions marked throw() or specified “Throws: Nothing” to be marked noexcept, and removing non-empty exception specifications from the standard library.

Restricting implicit move generation. A hot topic going into this meeting was that move operations could be generated implicitly for an existing type in ways that would be surprising and incorrect (i.e., break the invariants that should hold on all objects of that type). The previous rule was to generate a move constructor and move assignment operator implicitly if the class had no user-declared copy constructor and the move constructor would not be implicitly defined as deleted. Several options were discussed at length, including not generating move implicitly at all. In the end, the decision was that implicit move was both desirable but needed to be generated less aggressively to ensure correctness, and so now the rule is to generate a move constructor and move assignment operator implicitly if the class had no user-declared copy constructor and the move constructor would not be implicitly defined as deleted (same as before) and the class has no user-declared copy or move assignment operator or user-declared destructor. Here’s the paper with the wording changes.

Looking forward

Finally, here are the scheduled dates and locations for next year’s ISO C++ standards committee meetings:

  • March 21-26, 2011: Madrid, Spain
  • August 15-19, 2011: Bloomington, IN, USA