Swiftweekly.github.io: [131] Issue #131 - April 4, 2019

Created on 21 Mar 2019  Β·  37Comments  Β·  Source: SwiftWeekly/swiftweekly.github.io

To contribute to this issue, simply leave a comment here. Please also review our contributing guidelines.

The current draft for this issue in _drafts/. If you want to contribute directly, feel free to open a pull request.

full issue notes

Most helpful comment

https://twitter.com/johannesweiss/status/1110480163106623488

πŸš€ SwiftNIO 2 for Swift 5 has shipped πŸ™Œ.

Thanks so much everybody, we're thrilled for the next chapter in the Swift on Server story 🚒.

https://forums.swift.org/t/swiftnio-2/22136

All 37 comments

245 accepted

Pitch: Implicit Returns from Single-Expression Functions

Swift provides a pleasant shorthand for short closures: if a closure contains just a single expression, that expression is implicitly returned--the return keyword can be omitted. We should provide this shorthand for functions as well.

Implementation

https://forums.swift.org/t/pitch-implicit-returns-from-single-expression-functions/21898

Pitch: Property Delegates

There are property implementation patterns that come up repeatedly. Rather than hardcode a fixed set of patterns into the compiler, we should provide a general "property delegate" mechanism to allow these patterns to be defined as libraries. The complete proposal follows, and the most up-to-date version will be available here.

Implementation

https://forums.swift.org/t/pitch-property-delegates/21895

Pitch: Static and class subscripts

Over the last few days I've put together a prototype of static subscripts, which allow you to add subscripts that are applied to a type, rather than an instance. There's a lot of work to be done, but so far, it's looking pretty good; I've even gotten dynamic member lookup and key paths working (although they're a stretch goal and I might defer them before the final proposal). I think they would be a good addition to the language.

https://forums.swift.org/t/pitch-static-and-class-subscripts/21850

History: Why does closure syntax use the keyword in?

image

https://forums.swift.org/t/history-why-does-closure-syntax-use-the-keyword-in/21885

Maybe this can be fun one :)

The review of SE-0251: SIMD Additions begins now and runs through April 1st, 2019.

https://forums.swift.org/t/se-0251-simd-additions/21957

Blog post about Swift 5 release

https://swift.org/blog/swift-5-released/

The review of SE-0244: Opaque Result Types has concluded and the proposal has been returned for revision.

https://forums.swift.org/t/returned-for-revision-se-0244-opaque-result-types/22115

https://twitter.com/johannesweiss/status/1110480163106623488

πŸš€ SwiftNIO 2 for Swift 5 has shipped πŸ™Œ.

Thanks so much everybody, we're thrilled for the next chapter in the Swift on Server story 🚒.

https://forums.swift.org/t/swiftnio-2/22136

252 in review

NIOPostgres: A NIO-based PostgreSQL Driver by @tanner0101

https://forums.swift.org/t/niopostgres-a-nio-based-postgresql-driver/22178

https://twitter.com/jckarter/status/1110954850487943168

A great thread with tips if you're interesting in getting into compilers and language design https://forums.swift.org/t/how-to-become-an-expert-in-compilers-the-long-way/22175/10

243 rejected

The review of SE-0253: Static callables begins now and runs through April 5, 2019

https://forums.swift.org/t/se-0253-static-callables/22243

Unicode scalar literals

In light of the core team's decision on SE-0243, I'd like to kick off a pitch for single-quoted literals based on the feedback given.

https://forums.swift.org/t/unicode-scalar-literals/22224

The review of SE-0249 has concluded and the proposal has been accepted.

https://forums.swift.org/t/accepted-se-0249-key-paths-expressions-as-functions/22287

https://twitter.com/dgregor79/status/1111505088952991744

Refining some ideas under discussion for custom attributes in #SwiftLang over at https://forums.swift.org/t/pitch-introduce-custom-attributes/21335/47

https://twitter.com/slava_pestov/status/1111746907502723073

One of the earlier proposals that I don't think many people paid much attention to at the time was actually rather interesting in hindsight because it enabled a radical simplification of the compiler: https://github.com/apple/swift-evolution/blob/master/proposals/0060-defaulted-parameter-order.md

The proposal was accepted in Swift 3, but it didn't lead to any immediate major simplifications until we made enough progress chipping away at technical debt from SE-0110 in the function type and expression representation. Now everything has come together: https://github.com/apple/swift/pull/23672

https://twitter.com/twostraws/status/1111778640650555392

There's a fix for this already: https://github.com/apple/swift/pull/23674 – and people say filing a bug report with Apple doesn't work! 😎 https://twitter.com/twostraws/status/1111737369269600256

https://forums.swift.org/t/new-code-visualizer-for-swift-source-is-view/22454

A code visualizer for Swift. Made for April Fools' Day 2019. πŸ˜ƒ

https://twitter.com/slava_pestov/status/1113256921862090757

I was inspired by @brentdax’s work on static subscripts to get default arguments working for subscripts. This was supposed to be part of generic subscripts in Swift 4; @pathofshrines did some cleanup in SILGen recently that finally made it possible. https://github.com/apple/swift/pull/23734

252 accepted

https://twitter.com/Catfish_Man/status/1113597070504423424

I’ve posted a pitch for a new Swift String initializer that allows for faster interop with C APIs like CFStringGetBytes. Feedback gratefully accepted :)

https://forums.swift.org/t/pitch-add-a-string-initializer-with-access-to-uninitialized-storage/22611

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jessesquires picture jessesquires  Β·  4Comments

ColinEberhardt picture ColinEberhardt  Β·  5Comments

jessesquires picture jessesquires  Β·  9Comments

gregheo picture gregheo  Β·  3Comments

jessesquires picture jessesquires  Β·  6Comments