We currently pay a dear cost in compilation time for all the features Swift brings and this in itself harm productivity quite a bit, the gulf between Swift and Objective-C projects compile time wise is massive and right nowt seems like we are ignoring it sometimes. Type inference can be a non trivial component of that and while it is a wow factor feature initially, it has never been clear as a practical big win when code being self documenting and easy to debug and maintain is concerned...
Sent from my iPhone > On 11 Apr 2017, at 00:26, David Beck via swift-evolution > <[email protected]> wrote: > > This seems like something a linter should handle. > > > Hi all, > > > > In a discussion about inferring parameter types from default value, Slava > > brought up some performance problems caused by type inference for stored > > properties in side types: > > > > https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170313/033882.html > > > > Towards the end, the post mentioned that some Swift team members > > contemplated requiring types for stored properties in type declarations. I > > think this idea deserves some more attention. Hence this last minute > > idea-floating. > > > > In addition to solving a performance headache in implementation, there're > > always the general benefit of making type declartion more explicit and > > readable (clarity for reader should out-weigh pleasure of the author). > > Making the > > language slightly more consistent (we are not inferring types for default > > parameter values in function anyways). > > > > The cons for doing this are obvious too: the inference makes the language > > feels more friendly and is, undoubtedly, a beloved feature for many. This > > would be a source breaking change. > > > > Just thought I'd float the idea to gather some quick reaction. What do > > y'all think? > > > > Daniel Duan > > > > > > > > > David Beck > http://davidbeck.co > http://twitter.com/davbeck > http://facebook.com/davbeck > > _______________________________________________ > swift-evolution mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
