[swift-evolution] Proposal: label-only constructors

Drew Crawford drew at sealedabstract.com
Sun Dec 13 07:08:52 CST 2015


> On Dec 13, 2015, at 7:03 AM, ilya <ilya.nikokoshev at gmail.com> wrote:
> 
> (1) Isn't using a class function just one more symbol? 


No, a class/static function is not the same as an initializer.  e.g., a class function cannot assign to a let ivar.

> (2) Wouldn't this syntax be more logical:
> Key {
> init(forRSA: Void) { /* */ }
> }
> 
> Key(forRSA:)

Maybe.  The trailing colon gives me some anxiety; I feel like it wants something to follow it.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151213/e7257cad/attachment.html>


More information about the swift-evolution mailing list