-
C++ Strings
The string is a fundamental data type in many programming languages. In C++, a string is a data type that can store a sequence of characters. Despite being so ubiquitous and fundamental, strings are not primitive data types. To use a string in C++, you must include the <string> header from the standard template library…
-
Finding Closure: Rust’s Anonymous Functions
In software development, there exists the concept of functions. A function is generally defined by a signature, and that signature provides some defining information about the function, i.e., name, parameters, and return type. Functions are blocks of code that can be reused throughout a program through invocation. Simply call a function using its name, and…
-
Ghost in the Shell: PhantomData
Thu Rust compiler is notoriously strict, but this is not without good reason. Everything the Rust compiler does is to help guarantee type and memory safety so that (for the most part) the only bugs that can occur in a program’s runtime are logical in nature. Sometimes, the errors that the compiler throws may seem…