C++. Concepts

One more reading on what’s going on with the C++ standard. Concepts were proposed before, but now TS (Technical Specification) became concrete and may become a part of next standard. One thing I specifically like about concepts is that you can specify template constraints. Why do you need them? It’s simple. Constraints will help you to get human readable error messages from compiler instead of 100 lines garbage that current STL errors generated by compilers.

Anyway, Andrew Sutton’s article on what’s going on with concepts and why we need them:

http://accu.org/index.php/journals/2157

Writing Good C++

Yes, C++ is evolving. 🙂 C++14 is almost here and C++17 is rising in the horizon. I find it amazing that so far all attempts to make language somewhat more friendly and safer looked like islands of resistance created by small teams all around the world. And they were disconnected. Coding standards, numerous books on good practices, – we saw them all. We have not seen the C++ father Bjarne Stroustrup saying anything on this subject. I obviously ignoring his book “A Tour of C++” and his conference speeches, but those were conceptually still islands in the ocean. C++ is huge, standard is 300+ pages, last Bjarne’s book is more like a monument to the greatness of C++, but can’t be used neither as a manual nor tutorial.

Here we go. New initiative from The Father to define good practices and guidelines for modern C++.

Here’s his deck from keynote:

https://github.com/isocpp/CppCoreGuidelines/blob/master/talks/Stroustrup%20-%20CppCon%202015%20keynote.pdf

Interestingly, right from the beginning they came up with “good library” called GSL. Static syntax validation tools is coming (good!).

Github link to GSL: https://github.com/Microsoft/GSL

His speech on this subject at CppCon 2015. I like Bjarne’s philosophical view on coding standards. Yes, we hate them! 🙂

NSMutableArray implementation

Stumbled upon on very good deep dive into NSMutableArray implementation. When I just started working on iOS and MacOS development, somebody told me that NSMutableArray is based on a circular buffer, so it’s very efficient for queues and stacks as well. I remembered that and as 99% of engineers never really cared about details. Besides, Apple never released sources for its core classes. However curious minds, as usual, got to the bottom of the issue.

Here’s very well written article on implementation details.

Proudly powered by WordPress
Theme: Esquire by Matthew Buchanan.