> On Apr 18, 2016, at 8:21 PM, Joe Pamer via swift-evolution 
> <[email protected]> wrote:
> 
> I propose that we fully eliminate implicit bridging conversions in Swift 3. 
> This would mean that some users might have to introduce introduce a few more 
> ‘as’ casts in their code, but we would remove another special case from 
> Swift's type system  and be able to further simplify the compiler. If anyone 
> is curious and would like to take this model for a spin, I’ve pushed an 
> experimental branch that implements this proposed change, 
> inhibit-implicit-conversions.

What happens with string literals? Are they implicitly converted to NSString as 
necessary? Which of the following will be legal?

    import Foundation
    func s(_ str: String) { }
    func ns(_ str: NSString) { }

    let str: String = "foo"
    let nsstr: NSString = "foo"

    NSLog("foo")
    NSLog(str)
    NSLog(nsstr)

    s("foo")
    s(str)
    s(nsstr)

    ns("foo")
    ns(str)
    ns(nsstr)


-- 
Greg Parker     [email protected]     Runtime Wrangler


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

Reply via email to