Friday’s Q&A session now online

imageMy live Q&A after Friday’s The Future of C++ talk is now online on Channel 9. The topics revolved around…

… recent progress and near-future directions for C++, both at Microsoft and across the industry, and talks about some announcements related to C++11 support in VC++ 2012 and the formation of the Standard C++ Foundation.

Herb takes questions from a live virtual audience and demos the new http://isocpp.org site on an 82 inch Perceptive Pixel display attached to a Windows 8 machine.

Thanks to everyone who tuned in.

Our industry is young again, and it’s all about UI

Jeff Atwood’s post two days ago inspired me to write this down. Thanks, Jeff.

“I can’t even remember the last time I was this excited about a computer.”

Jeff Atwood, November 1, 2012


Our industry is young again, full of the bliss and sense of wonder and promise of adventure that comes with youth.

Computing feels young and fresh in a way that it hasn’t felt for years, and that has only happened to this degree at two other times in its history. Many old-timers, including myself, have said “this feels like 1980 again.”

It does indeed. And the reason why is all about user interfaces (UI).

Wave 1: Late 1950s through 60s

First, computing felt young in the late 1950s through the 60s because it was young, and made computers personally available to a select few people. Having computers at all was new, and the ability to make a machine do things opened up a whole new world for a band of pioneers like Dijkstra and Hoare, and Russell (Spacewar!) and Engelbart (Mother of All Demos) who made these computers personal for at least a few people.

The machines were useful. But the excitement came from personally interacting with the machine.

Wave 2: Late 1970s through 80s

Second, computing felt young again in the late 1970s and 80s. Then, truly personal single-user computers were new. They opened up to a far wider audience the sense of wonder that came with having a computer of our very own, and often even with a colorful graphical interface to draw us into its new worlds. I’ll include Woods and Crowther (ADVENT) as an example, because they used a PDP as a personal computer (smile) and their game and many more like it took off on the earliest true PCs – Exidy Sorcerers and TRS-80s, Ataris and Apples. This was the second and much bigger wave of delivering computers we could personally interact with.

The machines were somewhat useful; people kept trying to justify paying $1,000 for one “to organize recipes.” (Really.) But the real reason people wanted them was that they were more intimate – the excitement once again came from personally interacting with the machine.

Non-wave: 1990s through mid-2000s

Although WIMP interfaces proliferated in the 1990s and did deliver benefits and usability, they were never as exciting to the degree computers were in the 80s. Why not? Because they weren’t nearly as transformative in making computers more personal, more fun. And then, to add insult to injury, once we shipped WIMPiness throughout the industry, we called it good for a decade and innovation in user interfaces stagnated.

I heard many people wonder whether computing was done, whether this was all there would be. Thanks, Apple, for once again taking the lead in proving them wrong.

Wave 3: Late 2000s through the 10s

Now, starting in the late 2000s and through the 10s, modern mobile computers are new and more personal than ever, and they’re just getting started. But what makes them so much more personal? There are three components of the new age of computing, and they’re all about UI (user interfaces)… count ’em:

  1. Touch.
  2. Speech.
  3. Gestures.

Now don’t get me wrong, these are in addition to keyboards and accurate pointing (mice, trackpads) and writing (pens), not instead of them. I don’t believe for a minute that keyboards and mice and pens are going away, because they’re incredibly useful – I agree with Joey Hess (HT to @codinghorror):

“If it doesn’t have a keyboard, I feel that my thoughts are being forced out through a straw.”

Nevertheless, touch, speech, and gestures are clearly important. Why? Because interacting with touch and speech and gestures is how we’re made, and that’s what lets these interactions power a new wave of making computers more personal. All three are coming to the mainstream in about that order…

Four predictions

… and all three aren’t done, they’re just getting started, and we can now see that at least the first two are inevitable. Consider:

Touchable screens on smartphones and tablets is just the beginning. Once we taste the ability to touch any screen, we immediately want and expect all screens to respond to touch. One year from now, when more people have had a taste of it, no one will question whether notebooks and monitors should respond to touch – though maybe a few will still question touch televisions. Two years from now, we’ll just assume that every screen should be touchable, and soon we’ll forget it was ever any other way. Anyone set on building non-touch mainstream screens of any size is on the wrong side of history.

Speech recognition on phones and in the living room is just the beginning. This week I recorded a podcast with Scott Hanselman which will air in another week or two, when Scott shared something he observed firsthand in his son: Once a child experiences saying “Xbox Pause,” he will expect all entertainment devices to respond to speech commands, and if they don’t they’re “broken.” Two years from now, speech will probably be the norm as one way to deliver primary commands. (Insert Scotty joke here.)

Likewise, gestures to control entertainment and games in the living room is just the beginning. Over the past year or two, when giving talks I’ve sometimes enjoyed messing with audiences by “changing” a PowerPoint slide by gesturing in the air in front of the screen while really changing the slide with the remote in my pocket. I immediately share the joke, of course, and we all have a laugh together, but the audience members more and more often just think it’s a new product and expect it to work. Gestures aren’t just for John Anderton any more.

Bringing touch and speech and gestures to all devices is a thrilling experience. They are just the beginning of the new wave that’s still growing. And this is the most personal wave so far.

This is an exciting and wonderful time to be part of our industry.

Computing is being reborn, again; we are young again.

Talk now online: The Future of C++ (VC++, ISO C++)

imageYesterday, many thousands of you were in the room or live online for my talk on The Future of C++. The talk is now available online.

This has been a phenomenal year for C++, since C++11’s publication just 12 months ago. And yesterday was a great day for C++.

Yesterday I had the privilege of announcing much of what Microsoft and the industry have been working on over the past year.

(minor) C++ at Microsoft

On September 12, we shipped VC++ 2012 with the complete C++11 standard library, and adding support for C++11 range-for, enum class, override and final. Less than two months later, yesterday we announced and shipped the November 2012 CTP, a compiler add-in to VC++ 2012 adding C++11 variadic templates, uniform initialization and initializer_lists, delegating constructors, function template default arguments, explicit conversion operators, and raw string literals. Details here, and download here.

Note that this is just the first batch of additional C++11 features. Expect further announcements and deliveries in the first half of 2013.

(major) C++ across the industry

Interest and investment in C++ continues to accelerate across the software world.

  • ISO C++ standardization is accelerating. Major companies are dedicating more people and resources to C++ standardization than they have in years. Over the next 24 months, we plan to ship three Technical Specifications and a new C++ International Standard.
  • C++ now has a home on the web at isocpp.org. Launched yesterday, it both aggregates the best C++ content and hosts new content itself, including Bjarne Stroustrup’s new Tour of C++ and Scott Meyers’ new Universal References article.
  • We now have a Standard C++ Foundation. Announced yesterday, it is already funded by the largest companies in the industry down to startups, financial institutions to universities, book publishers to other consortia, with more members joining weekly. For the first time in C++’s history since AT&T relinquished control of the language, we have an entity – a trade organization – that exists exclusively to promote Standard C++ on all compilers and platforms, and companies are funding it because the world runs on C++, and investing in Standard C++ is good business.

This is an exciting time to be part of our industry, on any OS and using any language. It’s especially an exciting time to be involved with C++ on all compilers and platforms.

Thank you all, whatever platform and language you use, for being part of it.

Links:

The Future of C++: Live broadcast this Friday

imageIn my talk on Friday, there will be announcements of broad interest to C++ developers on all compilers and platforms. Please help spread the word.

The Future of C++

Friday, November 2, 2012
12:45pm (U.S. Pacific Time)

This talk will give an update on recent progress and near-future directions for C++, both at Microsoft and across the industry, with some announcements of interest in both areas. The speaker is the lead language architect of Visual C++ and chair of the ISO C++ committee.

The talk will be webcast live on Channel 9, and available soon afterwards on demand.

If you know people who are interested in C++, on any platform, you’ll want to let them know to tune in.

Reader Q&A: volatile (again)

Sarmad Asgher asked a variant of a perennial question:

I am implementing multi producer single consumer problem. I have shared variables like m_currentRecordsetSize which tells the current size of the buffer. I am using m_currentRecordsetSize in a critical section do i need to declare it as volatile.

If you’re in C or C++, and the variable is not already being protected by a mutex or similar, then you need to declare it atomic (e.g., if it’s an int, then atomic_int in C or atomic<int> in C++. Not volatile.

Also is there any article by you on this topic. Please do reply.

There is! See my article “volatile vs. volatile” for the difference and why C/C++ volatile has nothing to do with inter-thread communication.

CTP of Windows XP Targeting with C++ in Visual Studio 2012

The three by-far-most-requested “missing features” from Visual C++ 2012 were:

  1. Conformance: Keep adding more C++11 language conformance features.
  2. XP Targeting: Deliver the ability to build applications that could run on Windows XP, as well as Windows Vista, 7, and 8.
  3. Desktop Express: Deliver a free VC++ Express compiler that can be used to create traditional Windows desktop apps, not just Windows Store apps.

Over the spring and summer, we promised to address these “soon after VC++ 2012 ships.”

Well, VC++ 2012 shipped four weeks ago.

What’s happened since then?

 

3. On the same day VS2012 shipped, four weeks ago, we also announced and released Visual Studio 2012 Desktop Express – a free Visual Studio version for writing traditional Windows applications.

 

image2. Today, we are pleased to share a “community tech preview” (CTP) of Windows XP targeting in Visual C++ 2012, being delivered as part of Visual Studio 2012 Update 1 CTP 3. You can download the preview here. See the announcement page for details, known issues, and full release information.

 

1. Stay tuned…

Poll: What features would you like to see added soonest in your favorite C++ compiler?

I just got back from teaching a class, and I’m always amazed at the breadth and diversity of C++ developers. As Bjarne Stroustrup famously says: “No one knows ‘what most C++ developers do.'”

In particular, I’m surprised at how strongly some people feel about certain features, such as refactoring or safety or raw performance or exhaustive conformance, that don’t matter much at all to other people, and it made me wonder how a cross-section of the C++ developer community might prioritize them if I ran a poll.

So let me pose a question: Whether you use gcc or Clang or VC++ or Intel C++ or any other compiler, if you could only pick five of the following for your compiler to implement in its very next release, which would they be? Note that this is intended to be purely an “urgency” or ordering exercise, not an “importance” or eventually-will/won’t-do exercise — assume that your compiler vendor would eventually add everything possible from the list in their next few releases, and ask yourself only what would you just love to have in your hands the very soonest, right away?

(This is not intended to be a complete list, by the way, just picking some things I’ve again recently heard people mention, to validate how broadly interesting they really are.)

Thanks in advance for your participation. I’m really curious to see the results.

[Updated to add: Several people have asked to change the poll to add an option for “faster build times”. I won’t change the poll while in progress which would skew results, but for now if you want to vote for “faster builds” please post it as a comment and I’ll manually add those comments up since that seems to be a popular request.]

Casablanca: C++ on Azure

azr331I’ve blogged about Casablanca before. Here’s a related talk from TechEd Australia:

Casablanca is a Microsoft incubation effort to support cloud-based client-server communication in native code using a modern asynchronous C++ API design. Think of it as Node.js, but using C++ – from simple services, to JSON and REST, to Azure storage and deployment, and more.

Casablanca gives you the power to use existing native C++ libraries and code to do awesome things on the cloud server. In this talk from TechEd Australia, John Azariah and Mahesh Krishnan show how it’s done.

C&B 2012 panel posted: Ask Us Anything!

cnb2012-panelThe second panel from C++ and Beyond 2012 is now available on Channel 9:

Alexandrescu, Meyers and Sutter – Ask Us Anything

Here is the “Ask Us Anything” panel from C++ and Beyond 2012.

Andrei Alexandrescu, Scott Meyers and Herb Sutter take questions from attendees. As expected, great questions and answers…

Table of contents (click the time codes ([xx:xx]) to hear the answers…):

  • message passing primitives in future versions of the standard… [00:00]
  • standardized unit testing framework… [02:55]
  • std::async… [04:30]
  • standard modules proposal… [08:14]
  • keyword additions and the standard library… [09:35]
  • problems (and solutions) with exceptions… [12:50]
  • future of concepts… [22:34]
  • std::thread and thread interruption… [23:03]
  • when to use the auto keyword (and when not to…)… [25:03]
  • more on auto (benefits of reduncancy, type conversion issues with bool to int?)… [29:31]
  • const and multithreaded programming, in C++11 const means thread safe, too… [35:00]
  • yet more on auto (impact on rampant use and code readability/comprehension)… [42:42]
  • compiler type deduction information (compiler switch that prints out auto deduced type information)… [50:18]
  • printing out code for review that replaces auto with the actual type… [53:30]
  • auto and dynamic memory allocation… [54:59]
  • useful, broadly-used concurrency libraries… [57:00]