[swift-evolution] SE-0068 MIA? - Self.classMethod() from instance methods

John Holdsworth mac at johnholdsworth.com
Thu Apr 20 10:13:22 CDT 2017


I was going to have a look at creating a new proposal for this but I see there already
is one <https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160425/015977.html> and the start of an implementation <https://github.com/apple/swift/pull/3866>. Is there any chance this is in the pipeline?

- John

> On 13 Dec 2016, at 02:13, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:
> 
> On Mon, Dec 12, 2016 at 6:15 PM, John Holdsworth via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
> I’m sure it’s been discussed before but I wish static and class vars and
> functions were in scope for instance methods without having to prefix them
> as they are in Java.
> 
> I agree that it's annoying to have to prefix them with `VeryLongTypeNames.everyTime()`. Fortunately, SE-0068 was already approved a long time ago that makes this a lot better, though it's not the specific solution you're advocating for. Namely, we'll be able to write `Self.everyTime()` instead, and IMO it can't come fast enough. It's just that no one has stepped up to implement it. Santa?
>  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170420/b8715e1f/attachment.html>


More information about the swift-evolution mailing list