C++Now! 2012

Expressiveness

The expressiveness of source code is a qualitative measure of how directly it describes the intention of the programmer.

Effective code is dependent on two things: the programmer’s understanding of what she wants to accomplish, and her ability to map that understanding onto the available language and library constructs. When understanding is clear and the mapping is direct, programs are more readable and maintainable, but writing them is also easier, faster, and more fun.

Constructs that make programming more expressive are often dismissed as “syntactic sugar,” but syntax and abstraction clearly count, or we’d all be programming in assembly language. Just as C++ helps us express our ideas with high-level general-purpose constructs such as classes and functions, libraries provide specialized high-level abstractions–like smart pointers, date and time objects, parsers, and state machines–that allow us to express solutions to our programming problems in the same terms we use when thinking and speaking of them.

At its most expressive, programming takes on a declarative quality: rather than describing how the problem should be solved, one simply describes the problem itself, and the library provides all the procedural logic for a solution. For example, given a simple in-code grammar description, the Boost Spirit library generates an efficient parser. Compared with handwritten parsing logic, the resulting code is much more likely to be correct when written and is understandable at a glance. It also exhibits phenomenally effective decoupling: the programmer can change the language being parsed without becoming entangled in low-level details of token processing, and the library author can optimize or radically alter the basic parsing mechanism without disturbing application code.

At Boostpro, our design process gives special weight to expresiveness so that our clients can wield the libraries with power and confidence.

News

  • BoostCon / C++Next!: Register Now and Save $100

    Less than three days remain before the early registration deadline The amazing 6th Boost conference, now with additional track containing 15 hours of C++11 tutorials, is still $599 for a short time only.

    More...

  • C++ Next!: the future of C++, brought to you by BoostCon

    Join the entire BoostPro team in Aspen May 12 – 18th. With the addition of a third track and the expansion of an already stellar program, BoostCon 2012 has come into its own this year. The early-bird registration deadline is April 15th, so sign up now.

    More...

  • Dave to speak at PossConn 2012

    Dave Abrahams will give two talks at this year’s Palmetto Open Source Software Conference in Columbia, SC on March 28th & 29th. More information at www.posscon.org.

    More...