<commit_before>---
layout: post
title: ! 'Issue #89'
author: jsq
sponsor:
    link: TODO
    heading: TODO
    body: TODO
    displaylink: TODO
---

> TODO: intro comments

<!--excerpt-->

{% include sponsor.html %}

### Starter tasks

> TODO

{% include task_remind.html %}

### Swift Unwrapped

> TODO: Latest episode of Swift Unwrapped

### News and community

> TODO

### Commits and pull requests

> TODO

### Accepted proposals

> TODO

### Returned proposals

> TODO

### Rejected proposals

> TODO

### Proposals in review

> TODO

### Mailing lists

> TODO

### Finally

> TODO: something funny/fun. tweet, link, etc.<commit_msg>Issue/89 (#317), #314<commit_after>---
layout: post
title: ! 'Issue #89'
author: roman
---

Welcome to the 89th issue of Swift Weekly Brief! This week was more calm, no news explosions. The repositories and mailing lists had their usual activity.

<!--excerpt-->

{% include sponsor.html %}

### Starter tasks

Starter tasks are a great way to get started with contributing to Swift. Ask questions directinly in the bug reporting system, and get feedback when you submit your pull request.

* [SR-5996](https://bugs.swift.org/browse/SR-5996): Improve compiler error with a fix-it: Cannot assign to value, 'bar' is a 'let' constant
* [SR-5995](https://bugs.swift.org/browse/SR-5995): update-checkout --tags should fetch --tags before attempting to find a tag
* [SR-5983](https://bugs.swift.org/browse/SR-5983): Unused result warning phrasing is worse for closures than normal functions
* [SR-5982](https://bugs.swift.org/browse/SR-5982): didSet causes unwanted calls to getter even when oldValue isn't used

{% include task_remind.html %}

### Swift Unwrapped

In [Episode 30](https://spec.fm/podcasts/swift-unwrapped/87409) Jese and JP welcome Mike Ash to discuss weak references and the implementation changes that shipped in Swift 4.

### News and community

We can celebrate 10th LLVM [anniversary](https://twitter.com/llvmorg/status/912724943221096448)! 🎉 🎊 As you know, Swift and most modern languages are built on top of LLVM. Keep it up, [LLVM](http://llvm.org)!

<NAME> [wrote](https://mikeash.com/pyblog/friday-qa-2017-09-22-swift-4-weak-references.html) a great Friday Q&A about the changes in Swift's weak references implementation. (This is the post he discussed on Swift Unwrapped.)

> Weak references are an important language feature. Swift's original implementation was wonderfully clever and had some nice properties, but also had some problems. By adding an optional side table, Swift's engineers were able to solve those problems while keeping the nice, clever properties of the original. The side table implementation also opens up a lot of possibilities for great new features in the future.

[<NAME>](https://medium.com/@ahmedsulaiman) wrote a descriptive blog post: [Debugging Swift code with LLDB](https://medium.com/flawless-app-stories/debugging-swift-code-with-lldb-b30c5cf2fd49) about using lldb in general and some unpopular tricks with Swift debugging. Take this chance to enhance your debugging skills!

Russ Bishop [shared the problem](https://twitter.com/xenadu02/status/911463433521860609) behind the Xcode 9 simulator's very slow performance &mdash; surprising.

### Commits and pull requests

[<NAME>](https://github.com/DougGregor) [opened pull requests](https://github.com/apple/swift/pull/11923) that implements the standard library part of [SE-0157: Recursive Protocol Constraints](https://github.com/apple/swift-evolution/blob/master/proposals/0157-recursive-protocol-constraints.md).
> - Make the SubSequence associated type have the same capabilities as its enclosing protocol, e.g., Sequence.SubSequence conforms to Sequence, Collection.SubSequence conforms to Collection, and so on.
> - Make the Indices associated type have the same traversal requirements as its enclosing protocol, e.g., Collection.Indices conforms to Collection, BidirectionalCollection.Indices conforms to BidirectionalCollection, and so on
> - Make Numeric.Magnitude conform to Numeric
> - Use more efficient SubSequence types for lazy filter and map
> - Eliminate the *Indexable protocols.

[<NAME>](https://github.com/jckarter) [fixed](https://github.com/apple/swift/pull/12112) compiler crash in case where code captured *[weak self]* in a closure inside a class method returning dynamic *Self*.

[<NAME>](https://github.com/jrose-apple) [merged pull request](https://github.com/apple/swift/pull/12101) with Swift compiler crash fix in situations with Objective-C inheritence from a typedef for a class/protocol composition as shorthand for inheriting from the class and adopting the protocol.

[<NAME>](https://github.com/phausler) [made](https://github.com/apple/swift/pull/11939) great improvement into Data slices. This change fixes [SR-5887](SR-5887), [SR-5873](https://bugs.swift.org/browse/SR-5873) and [SR-5810](https://bugs.swift.org/browse/SR-5810).
> Mutation of Data slices had issues when it comes to re-indexing to the base slice region. Previously when a slice of Data was mutated the re-calculation of the slice region was incorrectly assigned to a relative region to the previous backing. Now the slice region will copy the specific region out creating a new data upon CoW semantics and offset the index region upon access. Mutating a non CoW slice will retain the previous region backing but adjust the remaining allocation buffer accordingly. To validate this I have added tests for combinations that should approximate all possible combinations of mutations, backing storages and CoW scenarios.

[<NAME>](https://github.com/DougGregor) [merged pull request](https://github.com/apple/swift/pull/12097) with introduction of caching name lookup for nested types of generic types through the equivalence class.

[<NAME>](https://github.com/compnerd) [added](https://github.com/apple/swift/pull/12136) improvement into Windows ARM headers to support building the runtime.

[<NAME>](https://github.com/slavapestov) [merged pull request](https://github.com/apple/swift/pull/12030) with preliminary implementation of a code completion fuzzer.

[<NAME>](https://github.com/Kacper20) [implemented](https://github.com/apple/swift/pull/12128) [SR-5743](https://bugs.swift.org/browse/SR-5743).

[<NAME>](https://github.com/milseman) [opened pull request](https://github.com/apple/swift/pull/12115) of prototype implementation for new String comparison.

[<NAME>](https://github.com/Kacper20) [merged](https://github.com/apple/swift/pull/12123) pull request with improvements to refactoring.

### Proposals

No updates on proposals this week. As always, you can check out the [Swift Evolution status page](https://apple.github.io/swift-evolution/) for all the details.

### Mailing lists

<NAME> [revive](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170925/039944.html) pitch to add *remove(where:)* function into standard library. You can [check](https://github.com/airspeedswift/swift-evolution/blob/0f4a24d6ded2ab7cb39c1a68e0f92705a7615d73/proposals/NNNN-RemoveWhere.md) proposal draft and add yourself into discussion.

Swift core team gave [answer](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170925/039907.html) about [Discussion: Resources](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170918/039874.html) this week.
> ....
> We're currently defining our roadmap for SwiftPM in Swift 5, and it's not clear yet whether resource support will fit into this year or not, but either way it's clearly something we'll want to do. We're looking to encourage a thriving developer community around the Swift package manager, and we know that this will be important for many uses. If there are other limitations that are currently holding people back, we'd welcome feedback (and contributions!).
> ....

### Finally

[Slicing](https://github.com/apple/swift/pull/11939) a CoW should result in fillet mignon not ground chuck.
{'fraction_non_alphanumeric': 0.10614454797280282, 'fraction_numerical': 0.03475195164945857, 'mean_word_length': 4.747467438494935, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 39, 'https://': 40, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1439278', 'n_tokens_mistral': 2528, 'n_tokens_neox': 2215, 'n_words': 847}