-
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…
-
The Observer Pattern
One of the fundamental software behavioral patterns discussed in the Gang of Four’s Design Patterns, the observer pattern is very useful for maintaining one-to-many relationships between objects. As such, it is typically implemented in OOP languages such as C++, Java, Rust, etc. This article will explore the motivation behind using the observer pattern, and an…