> On Jul 10, 2016, at 11:44 , Saagar Jha via swift-users
> <[email protected]> wrote:
>
> Well, what if you wanted to create a String with one character? There’s no
> way to differentiate.
That hardly seems like the justification. In that case, you'd specify the type:
let s: String = '\n'
>
> > On Jul 7, 2016, at 02:35, 王 黎明 via swift-users
> > [[email protected]](mailto:[email protected]) wrote: >
>
> In Swift, we must specify the type for Character variables(because there’s no
> Character literals):
>
> let eol: Character = “\n”
>
> it's not a big problem, but, Is it the unique case that can’t use type infer?
>
> swift-users mailing list [email protected]
> https://lists.swift.org/mailman/listinfo/swift-users
>
> --
> -Saagar Jha
> _______________________________________________
> swift-users mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-users
--
Rick Mann
[email protected]
_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users