Meeting 12 September 2019
C++20 Concepts Are Here in Visual Studio 2019 version 16.3
https://devblogs.microsoft.com/cppblog/c20-concepts-are-here-in-visual-studio-2019-version-16-3/
https://www.reddit.com/r/cpp/comments/d2alin/c20_concepts_in_visual_studio_2019_version_163/
Dropbox abandons C++, uses Swift, Kotlin, JavaScript and Electron instead
Eyal Guthmann (Dropbox): The (not so) hidden cost of sharing code between iOS and Android
Reddit: https://www.reddit.com/r/cpp/comments/cqft4t/dropbox_replaces_c_with_platformspecific_languages/
HackerNews: https://news.ycombinator.com/item?id=20695806
It’s possible we could have done a better job at leveraging open source C++ libraries, but the open source culture in the C++ development community was (is still?) not as strong as it is in the mobile development community <...>
It seems like the real issue was that Dropbox lost all of their senior C++ engineers.
Previously
Unified function call
Barry Revzin
Bjarne Stroustrup. A bit of background for the unified call proposal
Based on real input from code and users, I reluctantly agreed that for compatibility reasons, x.f(y) and f(x,y) could not mean exactly the same. The only feasible way forward was to do a traditional lookup based on the syntax used, and then try the other syntax if the first one failed. Stability – backwards compatibility – is an important feature, overruling my desire for perfection.
Approval tests
Also known as Golden Master Tests or Snapshot Testing (locking down current behaviour)
CppOnSea 2019 - Clare Macrae - Quickly testing legacy code https://youtu.be/dtm8V3TIB6k
CppCast with Clare Macrae https://cppcast.com/clare-macrae/
Code https://github.com/approvals/ApprovalTests.cpp (Apache 2.0)
Approval Tests Library - Capturing Human Intelligence [available for Java, C#, VB.Net, PHP, Ruby, Node.JS and Python] https://approvaltests.com/ by Llevelyn Falco
- Supports Catch, Catch 2, Google Test, Okra
Mutation tests: sabotage the code
Books
- Modern C++ Programming with Test-Driven Development, by Jeff Langr https://learning.oreilly.com/library/view/modern-c-programming/9781941222423/
- Your Code as a Crime Scene, by Adam Tornhill https://learning.oreilly.com/library/view/your-code-as/9781680500813/
- Software Design X-Rays, by Adam Tornhill https://learning.oreilly.com/library/view/software-design-x-rays/9781680505795/
Tools
- OpenCoverage https://github.com/OpenCppCoverage
- BullseyeCoverage https://www.bullseye.com
Crash course in Qt for C++ developers
https://www.cleanqt.io/blog/crash-course-in-qt-for-c%2B%2B-developers,-part-1
Modern Qt Development: The Top 10 Tools You Should Be Using
https://blog.qt.io/blog/2018/10/12/modern-qt-development-top-10-tools-using/
https://www.reddit.com/r/cpp/comments/9njw5n/is_there_an_easytouse_gui_library/
CMake it modern using C++ and Qt
https://www.cleanqt.io/blog/cmake-it-modern-using-c%2B%2B-and-qt,-part-1
A new SQLite C++ wrapper
https://blog.trailofbits.com/2019/08/26/wrappers-delight/
https://www.reddit.com/r/cpp/comments/cxxk4b/a_new_c_sqlite_wrapper/
The Reddit thread also includes a heated discussion on how to handle errors and if exceptions are a good thing (eyeroll).
strong_typedef - Create distinct types for distinct purposes
Article by Anthony Williams
https://www.justsoftwaresolutions.co.uk/cplusplus/strong_typedef.html
https://github.com/anthonywilliams/strong_typedef
using transaction_id = jss::strong_typedef<struct transaction_tag, std::string>; bool is_a_foo(transaction_id id) { auto &s = id.underlying_value(); return s.find("foo") != s.end(); }