Swiftweekly.github.io: [155] Issue #155 - March 12, 2020

Created on 27 Feb 2020  Â·  19Comments  Â·  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

All 19 comments

https://twitter.com/tkremenek/status/1233168661805879297

Announcing a new command line argument parser library for Swift https://swift.org/blog/argument-parser/

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

If you're interested in ARMv8.3's pointer authentication feature and how language implementations can take advantage of it, we're upstreaming our arm64e support for Swift https://github.com/apple/swift/pull/30112

OMG this means we finally won’t have a billion arm64e merge conflicts every single week thank fuck

Pointer authentication is the same kind of thing as W^X or ASLR - it mitigates the damage that an attacker can do once they’ve already managed to exploit a security flaw somewhere. Really happy to see this work open sourced!

Tuples conform to Equatable, Comparable, and Hashable

Introduction
Introduce Equatable, Comparable, and Hashable conformance for all tuples whose elements are themselves Equatable, Comparable, and Hashable.

Swift-evolution thread: Tuples Conform to Equatable, Comparable, and Hashable

Motivation
Tuples in Swift currently lack the ability to conform to protocols. This has led many users to stop using tuples altogether in favor of structures that they can them conform protocols to. The shift from tuples to structures have made tuples almost feel like a second class type in the language because of them not being able to do simple operations that should just work.

Consider the following snippet of code that naively tries to use tuples for simple operations, but instead is faced with ugly errors.

https://forums.swift.org/t/tuples-conform-to-equatable-comparable-and-hashable/34156

Introducing “Time”

Today is Leap Day, so I'd like to introduce you to a new Swift package I've been working on for over 2 years
Time is a package that makes date and time calculations more expressive and safe in Swift. It's built on the power of Foundation's APIs, but smooths away their many rough and ambiguous edges. It relies heavily on Swift's generics to guarantee that the calculations you're performing are calendrically correct. If you'd like an overview of how it works, be sure to check out the documentation

https://forums.swift.org/t/introducing-time/34196

Yet another chunked sequence/collection idea

Continuing the discussion from Add Sequence.split(maxLength:):

The linked gist is (another) try-out of a chunked sequence. There are separate versions for Sequence and Collection because the sequence version is capable of passing on single-pass and/or infinite sources and the collection version is fixed at using its source's SubSequence for elements

https://forums.swift.org/t/yet-another-chunked-sequence-collection-idea/34198

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

I still need to write lots of tests, and I’m sure there are lots of bugs hidden here, but... #SwiftLang function builders support for “switch” statements is starting to work! https://github.com/apple/swift/pull/30174

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

Yay for code review. @pathofshrines noted a subtle omission in constraint generation that affected the semantics of switch statements in function builders. The fix was trivial but the implications are really interesting: https://github.com/apple/swift/commit/ea8d143f6425e4db7ba78df82776cc075add1e22:

Swift on Server WorkGroup February 19th, 2020 meeting notes

https://forums.swift.org/t/february-19th-2020/34310

[Discussion] OpenAPIKit

Codable implementation of OpenAPI Spec v3.x

https://forums.swift.org/t/discussion-openapikit/34374

Great thread with lot’s of resources and links previously talked about this topic.

Shorthand for guard else empty return statement

https://forums.swift.org/t/shorthand-for-guard-else-empty-return-statement/34404

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

Tim K and I collaborated on a nice little speedup for bridging ObjC collections containing NSStrings here: https://github.com/apple/swift/pull/30329

Turns out a surprisingly large chunk of the time went into looking up the correct bridging functions to call, rather than the actual work they do.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jessesquires picture jessesquires  Â·  6Comments

jessesquires picture jessesquires  Â·  10Comments

BasThomas picture BasThomas  Â·  4Comments

jessesquires picture jessesquires  Â·  5Comments

jessesquires picture jessesquires  Â·  10Comments