Why is FilePath an aggregate, instead of free functions?
• A: Under the covers, file-system functions typically interact with the O/S using a C API. Much of that API operates with a null-terminated string, requiring a conversion from D to C text. A free-function design is somewhat encouraged to invoke heap activity when interfacing with these API, by appending a null on each invocation. FilePath uses encapsulation to avoid this overhead by acting as a specialized text-editor, and employing a little bit of buffering. The heap activity is visible when using FilePath, rather than being hidden under the covers, and it is generally limited to O(1) rather than the O(n) of a per-invocation model. A similar situation exists where editing or concatenation of file-path components takes place.