Posted inInformation Technology

std::optional Example and Explanation

std::optional is an attempt by the academics on the C++ standards committee to “fix” what they believe to be abhorrent behavior. As usual they created a committee quality result. To understand my disgust with what they created you have to understand that I’ve been programming on real computers since the early 1980s. Even then VAX BASIC had OPTIONAL and a much better implementation for OPTIONAL parameters. You can read more about it in this book. … std::optional Example and ExplanationRead more

Posted inExperience / Information Technology

A std::vector Example and Explanation

If you want a really good method of identifying a legacy C++ library/framework, see if it provides a vector class. For C this would be a set of vector functions. Arrays in C and C++ are hard coded at compile time. This dates back to the beginning of the languages. During the early 1980s VAX BASIC was the only widely used programming language supporting dynamic arrays. You may not be familiar with BASIC but the … A std::vector Example and ExplanationRead more