Episode 51: The next Call to Random() Must Be 4 - a podcast by Phil Nash & Jon Kalb

from 2021-01-31T22:10:42.023393

:: ::


We've talked about contracts before, but this week Björn Fahller joins us to give us his thoughts, based on his recent talk at C++ on Sea. This is all pre-Kona - the recent Standards meeting that saw several tweaks to the wording for contracts in the draft standard for C++20.



Björn gives us a refresher of what contracts actually are, and how many of us have been using them in some form for years - even decades. Then we discuss what's actually going into C++20, why that's worth having compared to assert() or hand-rolled or library solutions - but also what the shortcomings are - including a couple of weakenesses that have cause some to think that contracts may be "dead on arrival". Where does the truth lie? Björn makes his case and (somewhat boringly) Jon and Phil tend to agree.



But what does it matter? The whole show is undefined behaviour, anyway.

Special Guest: Björn Fahller.

Links:


Further episodes of cpp.chat

Further podcasts by Phil Nash & Jon Kalb

Website of Phil Nash & Jon Kalb