In support of P1485 “Better keywords for coroutines”

Antony Polukhin’s P1485 “Better keywords for coroutines” is an almost-slam-dunk paper in my opinion. It names a glaringly obvious problem, proposes a clean solution, and incidentally solves some other minor problems along the way. I suspect it is going to need all the help it can get, just to get discussed before C++2a is released. (And after C++2a is released, of course it will be too late to change anything.)

Read More

Dealing with Dragons

I just finished re-reading (for the first time since at least high school) Patricia C. Wrede’s “Enchanted Forest Chronicles,” a four-book series of fantasy novels that began with Dealing with Dragons (1990). (Or, if you read the author’s forewords in front of each book in the boxed set I got, it turns out that Wrede wrote the final volume first and then filled in the backstory in pieces. You wouldn’t know it from the finished product, though; Wrede is a master of her craft.)

Read More

MapView can be faster than MapRef

Chandler Carruth gave a pretty great lightning talk at C++Now 2019 on his new ideas for a Map API; that is, the API for a data structure that stores key-value pairs. I disagreed with some of his intuitions, such as the promiscuous use of overloading — in particular I recall that some member functions took lambdas and were overloaded based on their parameter’s parameter type! Yuck! But the thing that made it great was this observation:

Read More

A faster WG21 CWG issue browser

Several weeks ago I made a thing: cwg-issue-browser.herokuapp.com/cwg1234 is a faster way to browse WG21 Core Working Group issues by number than the official URL www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1234. Because rather than loading and re-rendering 4 megabytes of text every time you load an issue, this little Heroku app caches those 4 megabytes on the server side and just sends over the little piece you’re interested in.

Read More

MSVC can’t handle move-only exception types

Here’s my second post from C++Now 2019!

On Friday morning, Andreas Weis gave a very good summary of how exception handling works in C++. I particularly liked that he didn’t just focus on the Itanium ABI (as I would certainly have been tempted to do), but showed in-depth knowledge of how exception handling works on MSVC and also on embedded platforms. The only thing that could have made Andreas’s talk better would have been if he’d mentioned my dynamic_cast From Scratch” (CppCon 2017). …

Read More

Befunge and Flobnar

A week-ish ago I discovered Flobnar, an esoteric programming language invented by Chris Pressey circa 2011 and described either as “a functional dual of Befunge-93” or “what happens when you get Befunge-93 drunk.”

Read More

This one weird trick for customization by class template (partial) specialization

Last night I attended the New York City C++ meetup (of which I am now a co-organizer!). Our speaker was JeanHeyd Meneide, giving a sneak preview of his upcoming C++Now talk “The Plan for Tomorrow: Extension Points in C++ Applications.” (By the way, there is still time and space for you to attend C++Now 2019! And your local C++ meetup is always looking for presenters, too!)

Read More