> On Mar 24, 2016, at 4:22 AM, Hugues Bernet-Rollande via swift-evolution 
> <[email protected]> wrote:
> ```
> var a:String? = String()
> // or
> var b = String() as String?
> // or
> var c:Optional<String> = String()
> ```

When I need to force an optional (primarily for sample code) I can do this 
already:

```
var myOptionalString = Optional("")
```

In this example, `myOptionalString ` picks up the type as well as the 
optionality.
Does this not meet your requirement of "Allowing to specify only the 
optionality part of 
a variable type while still having the actual wrapped type infered by the 
assignement" in existing
Swift?

Beyond that, can you offer any compelling use-cases that motivate this change?

-- E


_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to