Bjarne Stroustrup: No Littering

Bjarne Stroustrup gave a very excellent talk at the Computer Laboratory on Friday, which I was luckily able to attend, where he discussed his work on developing safe ways to use pointers to ensure that you don't run into any memory leaks or bugs from incorrect usage and gave a great argument against garbage collection.

He was particularly advocating for his work on the C++ Core Guidelines which have been getting a lot of attention recently and the Microsoft GSL (Guideline Support Library) which he used in his examples exploring the ideas.

The combination of this library and the guidelines was used to demonstrate a more secure way to ensure correct pointer and memory behaviour along with a tool for Visual Studio to perform static analysis on the usage of pointers to give feedback through matching any errors or possibly mistakes it found with advice for how to avoid it in the Core Guidelines.

It all looked very sensible and not too invasive like some memory usage patterns, so I was quite impressed and will probably have a bit of a play with the code myself this afternoon.

What I wasn't expecting during the talk was how much of an enthusiast Stroustrup was for simple and effective code. A lot of experience I have had in the past with people who write very high level C++ is that it often becomes unreadable templates with features not yet in the current spec which only compiles on a fork of compiler 'x'. This was absolutely not the case here and it brightened my day.

"Within C++ is a smaller, simpler, safer language struggling to get out." -- Bjarne Stroustrup

I am quite excited to see where his work goes on this subject and glad to see it is all open (and secretly happy it integrates so well with Visual Studio).


For more details from the man himself, here is a slightly older version of the talk he gave: