You don't touch on the fact that options act can act Monads (i.e., that you can invoke an operation on the inner value, conditional on whether or not the optional value is present). For example, an optional user translates naturally to an optional user.name.<p>I haven't tried swift, and it's not obvious to me from the swift documentation if their options support arbitrary transformations, or just method chaining. In ruby (with ActiveSupport) this is the difference between:<p><pre><code> might_be_nil.try(:method)
</code></pre>
and<p><pre><code> might_be_nil.try { |value| my_function(value) }
</code></pre>
The latter is more general and useful than the former.
Is this different than setting a default value of nil to user?<p><pre><code> def print_favorite_dinosaur(user: nil)</code></pre>
or<p><pre><code> def print_favorite_dinosaur(user = nil)
</code></pre>
Or is it effectively a different syntax for the same concept?<p>In either language, you still signal that the argument could be nil, and you still have to guard against it. Or so I think