[swift-evolution] [Manifesto] Completing Generics

David Sweeris davesweeris at mac.com
Fri Mar 11 09:03:17 CST 2016


In your defense, if you just say:
let x = f()
You'll get an error because the compiler can't know which one you're talking about.

Sent from my iPhone

> On Mar 10, 2016, at 16:02, Howard Lovatt via swift-evolution <swift-evolution at swift.org> wrote:
> 
> My apologies I didn't realise you could do that in Swift.
> 
>   -- Howard.
> 
>> On 11 March 2016 at 08:43, Joe Groff <jgroff at apple.com> wrote:
>> 
>>> On Mar 10, 2016, at 1:43 PM, Howard Lovatt <howard.lovatt at gmail.com> wrote:
>>> 
>>> @T.J.,
>>> 
>>> Swift does not allow overloading on return type. You cannot write:
>>> 
>>> func f() -> Int
>>> func f() -> String
>> 
>> You can.
>> 
>> -Joe
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160311/7e1bf309/attachment.html>


More information about the swift-evolution mailing list