[swift-evolution] [Proposal] Allow Static Function Properties to Satisfy Static Function Protocol Requirements

L. Mihalkovic laurent.mihalkovic at gmail.com
Mon Jul 11 15:56:30 CDT 2016


Regards
(From mobile)

> On Jul 11, 2016, at 8:24 PM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
>> on Sun Jul 10 2016, Jasdev Singh <swift-evolution at swift.org> wrote:
>> 
>> Hey Swift Evolution!
>> 
>> Drafted up a small proposal that harmonizes the use of static functions and
>> static function properties in appropriate protocol conformance scenarios:
>> 
>> https://github.com/Jasdev/swift-evolution/blob/static-func-static-var/proposals/XXXX-static-func-and-static-var-func-protocol-conformance.md
>> 
>> Would love any feedback or edge cases I may have missed!
> 
> Hi Jasdev,
> 
> I wanted this once, before Swift 1 was released.  Its lack was easy to
> work around and I have never wanted it since, so... I'm afraid I don't
> think it is worth complicating the language for.  Your proposal shows
> how the feature *can be used*, but doesn't make a compelling case that it
> *will be very useful*.  That's what would be needed to convince me.

Have you looked into the design patterns it opens the door to, or how it is used in languages where it is present? IME it has to do with higher degrees of abstractions or more dynamic behaviors. Granted it is also not the only way to achieve that. TypeScript might interest you if you have not yet looked into it closely.

> 
> HTH,
> 
> -- 
> Dave
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution


More information about the swift-evolution mailing list