Bjarne Stroustrup announces C++ Core Guidelines

This morning in his opening keynote at CppCon, Bjarne Stroustrup announced the C++ Core Guidelines (github.com/isocpp/CppCoreGuidelines), the start of a new open source project on GitHub to build modern authoritative guidelines for writing C++ code. The guidelines are designed to be modern, machine-enforceable wherever possible, and open to contributions and forking so that organizations can easily incorporate them into their own corporate coding guidelines.

The initial primary authors and maintainers are Bjarne Stroustrup and Herb Sutter, and the guidelines so far were developed with contributions from experts at CERN, Microsoft, Morgan Stanley, and several other organizations. The guidelines are currently in a “0.6” state, and contributions are welcome. As Stroustrup said: “We need help!”

Stroustrup said: “You can write C++ programs that are statically type safe and have no resource leaks. You can do that without loss of performance and without limiting C++’s expressive power. This supports the general thesis that garbage collection is neither necessary nor sufficient for quality software. Our core C++ guidelines makes such code simpler to write than older styles of C++ and the safety can be validated by tools that should soon be available as open source.”

From Stroustrup’s talk abstract:

In this talk, I describe a style of guidelines that can be deployed to help most C++ programmers… The rules are prescriptive rather than merely sets of prohibitions, and about much more than code layout… The core guidelines and a guideline support library reference implementation will be open source projects freely available on all major platforms (initially, GCC, Clang, and Microsoft).

Although the repository was not officially announced until today, it was made public last week and was noticed: CppCoreGuidelines was the #1 trending repository worldwide on GitHub on Friday, and is currently the #1 trending repository worldwide for the past week, across all languages and projects.

Stroustrup also announced two other related projects.

Guideline Support Library (GSL): First, the C++ Core Guidelines also specifies a small Guideline Support Library (GSL), a set of common types like array_view and not_null to facilitate following the modern guidelines. An initial open source reference implementation contributed and supported by Microsoft is now available on GitHub at github.com/Microsoft/GSL. It is written in portable C++ that should work on any modern compiler and platform, and has been tested on Clang/LLVM 3.6 and GCC 5.1 for Linux, with Xcode and GCC 5.2.0 for OS X, and with Microsoft Visual C++ 2013 (Update 5) and 2015 for Windows. This is both a supported library and an initial reference implementation; other implementations by other vendors are encouraged, as are forks of and contributions to this implementation.

Checker tool: Second, the C++ Core Guidelines are designed to be machine-enforceable wherever possible, and include many rules that can be checked by a compiler, lint, or other tool. An initial implementation based on Microsoft’s Visual Studio will be demonstrated in several talks at CppCon this week, including Herb Sutter’s Day 2 plenary session tomorrow morning. This implementation will be made available as a Windows binary in October, with the intention to open source the implementation thereafter. This too will become a supported tool and an initial reference implementation open to others; other implementations by other vendors of compilers, linters, and other tools are encouraged.

A number of other CppCon talks will go deeper into the related topics, notably the following talks by speakers who collaborated on the Guidelines effort:

Herb Sutter: Writing Good C++14 by Default (Tue 10:30am)

Gabriel Dos Reis: Large Scale C++ with Modules: What You Should Know (Tue 2:00pm)

Neil MacIntosh: More Than Lint: Modern Static Analysis for C++ (Wed 2pm)

Neil MacIntosh: A Few Good Types: Evolving array_view and string_view for Safe C++ Code (Wed 3:15pm)

Gabriel Dos Reis: Contracts for Dependable C++ (Wed 4:45pm)

Eric Niebler: Ranges and the Future of the STL (Fri 10:30am)

(and more)

If you’re at CppCon this week, watch for those talks. If you aren’t, like last year’s event, CppCon 2015 is again professionally recording all talks, and they will be freely available online about a month after the conference.

时间: 2024-10-15 13:44:07

Bjarne Stroustrup announces C++ Core Guidelines的相关文章

C++ Core Guidelines

C++ Core Guidelines September 9, 2015 Editors: Bjarne Stroustrup Herb Sutter This document is a very early draft. It is inkorrekt, incompleat, and pµøoorly formatted. Had it been an open source (code) project, this would have been release 0.6. Copy

What books does Bjarne Stroustrup suggest to master C++?

QUESTION : ANSWER: A Tour of C++ is a quick (about 180 pages) tutorial overview of all of standard C++ (language and standard library) at a moderately high level for people who already know C++ or at least are experienced programmers. The C++ Program

Bjarne Stroustrup 语录1

1. 请谈谈C++书.  没有,也不可能有一本书对于所有人来说都是最好的.不过对于那些真正的程序员来说,如果他喜欢从“经典风格”的书中间学习一些新的概念和技术,我推荐我的The C++ Programming Language, 1998年的第三版和特别版.那本书讲的是纯而又纯的C++,完全独立于平台和库(当然得讲到标准库).该书面向那些有一定经验的程序员,帮助他们掌握C++,但不适合毫无经验的初学者入门,也不适合那些临时程序员品尝C++快餐.所以这本书的重点在于概念和技术,而且在完整性和精确性

The C++ Programming Language - Bjarne Stroustrup

Preface Part 1: Introduction 1.1 The Structure of This Book 1.1.1 Introduction 1.1.2 Basic Facilities 1.1.3 Abstraction Mechanisms 1.1.4 The Standard Library 1.1.5 Examples and References 1.2 The Design of C++ 1.2.1 Programming Style 1.2.2 Type Check

我关注的一周技术动态 2015.09.27

分布式系统实践 1. 走向分布式 http://dcaoyuan.github.io/papers/pdfs/Scalability.pdf 要点: 这是台湾的一个作者写的为期30天的分布式系统设计学习小册子, 刚开始涵盖了分布式系统设计的基本理论, 包括partiton, replication和CAP理论, 后面以kafka和zookeeper为例, 将上述理论加以实例化介绍, 内容非常精简, 适合初学者阅读和学习. 2. 如何编写一个分布式数据库 http://mp.weixin.qq.c

zz c++ Useful resources

Useful resources < cpp The Standard C++ Foundation - Non-profit hub for C++ news, articles, and events C++ FAQs isocpp.org C++ FAQ - unified FAQ by the Standard C++ Foundation. Bjarne Stroustrup FAQ - Answers to the frequently asked questions from th

[Github项目]C++核心指南

C++作为一门多范型的语言,有灵活性.再加上C++的一些技巧,一些坑,很多公司都有自己的C++编码规范.这些规范一般都是建议什么该用,什么不该用,怎么去命名之类.没有提纲挈领地给出一个完整的规则体系.现在有了一些进展,Bjarne Stroustrup和Herb Sutter两位大神,在Github上发起了一个名为C++核心指南(C++ Core Guidelines)的项目.项目地址:https://github.com/isocpp/CppCoreGuidelines C++核心指南目的是帮

The Definitive C++ Book Guide and List

Programming: Principles and Practice Using C++ (Bjarne Stroustrup) (updated for C++11/C++14) An introduction to programming using C++ by the creator of the language. A good read, that assumes no previous programming experience, but is not only for be

awesome-modern-cpp

Awesome Modern C++ A collection of resources on modern C++. The goal is to collect a list of resouces to help people learn about and leverage modern C++11 and beyond. Contributing To add, remove or change things on the list: please submit a pull requ