C++ Books

Tuesday, November 6, 2012

Open and Efficient Type Switch for C++

by Yuriy Solodkyy, Gabriel Dos Reis, and Bjarne Stroustrup

Selecting operations based on the run-time type of an object is key to many object-oriented and functional programming techniques. We present a technique for implementing open and efficient type switching on hierarchical extensible data types. The technique is general and copes well with C++ multiple inheritance.

To simplify experimentation and gain realistic performance using production-quality compilers and tool chains, we implement a type switch construct as an ISO C++11 library, called Mach7. This library-only implementation provides concise notation and outperforms the visitor design pattern, commonly used for case analysis on types in object-oriented programming. For closed sets of types, its performance roughly equals equivalent code in functional languages, such as OCaml and Haskell. The type-switching code is easier to use and is more expressive than hand-coded visitors are. The library is non-intrusive and circumvents most of the extensibility restrictions typical of the visitor design pattern. It was motivated by applications involving large, typed, abstract syntax trees.

See also: OOPSLA'12 paper, slides, notes, extras, Mach7 Library

Where do you go to find out about C++?

by Kathy Flores

Texas A&M University's Department of Computer Science and Engineering is one of the founding members of the Standard C++ Foundation. Other founding members of the Foundation are Microsoft, Google, Intel, IBM, HP, ARM, Pearson, Bloomberg, OpenMP, BD Software... The Foundation is a not-for-profit organization with the mission to convey up-to-date information about C++ and to make available both standard and community libraries to developers of modern C++. It does this primarily through its isocpp.org website.

Among the initial contents, you can find a sample from Texas A&M's own Bjarne Stroustrup's forthcoming book: The C++ Programming Language (4th Edition).

The directors and officers of the Foundation are Chandler Carruth (Google) [Treasurer], Beman Dawes (Boost C++ Libraries), Stefanus Du Toit (Intel) [Secretary], Bjarne Stroustrup (Texas A&M University), Herb Sutter (Microsoft) [Chairman, President], and Michael Wong (IBM) [Vice President].

Wednesday, September 26, 2012

HotDrink: A Library for Web User Interfaces

by John Freeman, Jaakko Järvi, and Gabriel Foust

HotDrink is a JavaScript library for constructing forms, dialogs, and other common user interfaces for Web applications. With HotDrink, instead of writing event handlers, developers declare a "view-model" in JavaScript and a set of "bindings" between the view-model and the HTML elements comprising the view. These specifications tend to be small, but they are enough for HotDrink to provide a fully operational GUI with multi-way dataflows, enabling/disabling of values, activation/deactivation of commands, and data validation. HotDrink implements these rich behaviors, expected of high-quality user interfaces, as generic reusable algorithms. This paper/tool demonstration introduces developers to the HotDrink library by stepping through the construction of an example web application GUI.

The library is a concrete realization of our prior work on the "property models" approach to declarative GUI programming. To encourage adoption among developers, we have packaged the technology following established web programming conventions.

See also: GPCE'12 paper, property models, demo, project

Sunday, April 22, 2012

Bjarnefest

Workshop on Quality Software: A Festschrift for Bjarne Stroustrup

Texas A&M University, College Station, TX
April 27-28, 2012

The Workshop on Quality Software: A Festschrift for Bjarne Stroustrup will be held to honor and celebrate the career of Bjarne Stroustrup. The workshop will be held at Texas A&M University in College Station, TX. The program includes an opening reception on the evening of Thursday, April 26, technical presentations on April 27-28, and a banquet with reminiscences about Bjarne on the evening of Friday, April 27.