The word “Optional” by definition means available to be chosen, but not obligatory.
What does this mean in programming?
In programming languages and type theory, an option type or maybe type is a polymorphic type that represents encapsulation of an optional value; e.g., it is used as the return type of functions which may or may not return a meaningful value when they are applied.
So the question that comes to mind is What is Swift Optional? Is it a concept, behavior or something else? The answer is that it’s a data type!
Let’s read this line of code
When reading this line, someone would say that its type is a String, another would say it’s a String but Optional but that’s not correct. …