Feeds:
Posts
Comments

Archive for the ‘Uncategorized’ Category

Reblogged from Sutter’s Mill:

Want to know how to write cool tablet apps using Visual C++?

On May 18, Microsoft is hosting a one-day free technical event for developers who want to write Metro apps for Windows 8 using Visual C++. I’m giving the opening talk, and the rest of the day is full of useful technical information on everything from XAML and DirectX to networking and VC++ compiler flags.

Read more… 364 more words

Day-before reminder: If you are interested in tablet apps using VC++, check out the livestream starting at 9am U.S. Pacific time tomorrow, or come back later to watch the talks on demand.

Read Full Post »

WordPress.com expertise

I’m generally satisfied with the look and feel of this blog, but would like to tweak it in a few small ways to get a cleaner look, nicer formatting for code examples, and such.

If you or someone you know is familiar with WordPress.com blog customization, and is interested in a small project along these lines, please send me mail. Thanks.

Read Full Post »

I just posted two more sessions I’ll be giving next month at C++ and Beyond. (Aside: If you’re interested in coming, register soon; there are now only 11 seats left.)

  • “C++ Renaissance.” I’ve been asked to give the opening “Welcome, Everyone!” keynote talk at C&B 2011, and it’s time to cover an increasingly open secret: After a decade-long affair with managed languages where it became unfashionable to be interested in C++, C++’s power and efficiency are now getting very fashionable again. At the same time, C++ has been getting easier to use; key productivity features from the C++0x standard (aka C++11), like auto and lambdas, are increasingly widely available in commercial compilers and making using C++ easier than ever before without sacrificing its cornerstone — efficiency.This opening 40-minute talk covers the reasons why C++ is now enjoying a major renaissance, and why that will continue to grow over the next few years because of industry trends from processor design to mobile computing to cloud and datacenter environments.We already know that C++ is “the” language of choice for demanding applications. Here, we’ll cover why “demanding applications” increasingly means “most applications” and will be the bread and butter of our industry for the foreseeable future. We’ll see why and where other languages are still appropriate, but why C++’s applicability and demand is now again on an upswing more so than it has been for over a decade.
  • “How to Teach Today’s C++.”  With the C++ Renaissance gathering steam, I’ve personally noticed a growing need to train developers who are now turning or returning to C++. These developers don’t need to be taught how to program, but they aren’t familiar with how clean it is to write code using today’s C++. The key is: What is the best and clearest way to teach the essentials of today’s C++ — both what to teach, and what not to teach?This session shows that it is possible to show a very clean path through today’s C++ that is available to production developers right now, including use of key C++0x features already supported in many compilers, that shows how clean C++ code can be and how it compares favorably to code written in managed languages while still retaining its longstanding efficiency advantage.Many attendees coming to C++ and Beyond are experienced developers, often in senior or leadership positions. Your company may look to you to define or personally provide training in the best development techniques, whether through team brownbags or formal training sessions. As developers continue to come back to C++, you will find yourself increasingly called upon to help them quickly learn what “modern C++” really means today, and how clear and compelling it can be. This “train the trainers” session is intended to provide the foundation for that training, and give you the tools you need to train others, as we welcome them (and welcome them back) to our good friend C++.

I’ve already posted these other sessions, which round out my solo talk slots (not counting panels where Scott and Andrei and I will also all participate):

  • “C++ and the GPU… and Beyond.” I’ll cover the state of the art for using C++ (not just C) for general-purpose computation on graphics processing units (GPGPU). The first half of the talk discusses the most important issues and techniques to consider when using GPUs for high-performance computation, especially where we have to change our traditional advice for doing the same computation on the CPU. The second half focuses on upcoming C++ language and library extensions that bring key abstractions for GPGPU — and in time considerably more — directly into C++.
  •  “Exceptional C++0x (aka C++11)” that shows how the new features in C++0x change the way we solve problems, our C++ coding style, and even the way we think about our code. I’ll demonstrate that with code that works today on existing compilers, using selected familiar examples from my Exceptional C++ books. This is not rehashed material, as I’ll assume you’re already familiar with the pre-C++0x solutions (I’ll provide links to read as refreshers before the course), and then we’ll analyze and solve them entirely the 21st-century C++ way and see why C++0x feels like a whole new fresh language that leads to different approaches, new and changed guidelines, and even better solutions. As Bjarne put it: “Surprisingly, C++0x feels like a new language: The pieces just fit together better than they used to and I find a higher-level style of programming more natural than before and as efficient as ever.” This talk will show why — deeply, madly, and truly.

Read Full Post »

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 {
public:
  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 {
public:
  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

Herb

Read Full Post »

Comment policy

[Updated 3/17 for clarity.]

On this blog, I’ve always been happy to follow a policy of not editing or filtering comments, and to let comments stand whether the commenter agrees with me or not. However, recently a few comments have strayed into name-calling (e.g., I’d never heard the term “freetard” until last week), and I’ve decided to start moderating all comments, and to remove some existing comments that seem to me to be disrespectful of others.

Fortunately, the vast majority of comments aren’t like that, and opinions that respectfully disagree with my own or with those of other commenters continue to be welcome. Thanks for understanding.

Read Full Post »

Follow

Get every new post delivered to your Inbox.

Join 1,388 other followers