<div style="white-space:pre-wrap">Hi all,<br><br>In Optional.swift in the stdlib, there's a comment that says "The compiler has special knowledge of Optional<Wrapped>, including the fact that it is an enum with cases named 'None' and 'Some'."<br><br>What I'm trying to understand is: If I wanted to implement the optional type from scratch, what would be the process I would go through? I've scoured the swift-clang project and can't seem to find any reference to optionals or even Swift explicitly. I discovered nullability attributes and am hypothesizing that an expression of something like "Type?" is somehow mapped to an attribute, but I'm really just stumbling around in the dark.<br><br>In terms of what I've tried, I've gone through a lot of the source in the swift-clang lib/Basic and lib/AST directories, and I've read through the "Clang CFE Internals Manual" on the Clang website.<br><br>Help is much appreciated!<br><br>Thanks in advance,<br>Seth</div>